Skip to content

Commit

Permalink
[example] remove model downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
mli committed Nov 27, 2015
1 parent cfc9949 commit 7b575fd
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions example/neural-style/model_vgg19.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@

ConvExecutor = namedtuple('ConvExecutor', ['executor', 'data', 'data_grad', 'style', 'content'])

def _prepare_model():
if os.path.exists("./model/vgg19-0001.params"):
logging.info("find vgg19 model")
return
if not os.path.isdir("./model"):
os.system("mkdir model")
os.chdir("model")
file_path = os.path.abspath()
sys.path.append(os.path.join(curr_path, "../../python"))
tool = os.path.dirname(__file__) + "../../tools/caffe_converter/run.sh"
os.sytem(tool + " vgg19")
os.chdir("..")

def get_model(input_size, ctx):
# declare symbol
data = mx.sym.Variable("data")
Expand Down Expand Up @@ -63,7 +50,6 @@ def get_model(input_size, ctx):
arg_dict = dict(zip(arg_names, [mx.nd.zeros(shape, ctx=ctx) for shape in arg_shapes]))
grad_dict = dict(zip(arg_names, [mx.nd.zeros(shape, ctx=ctx) for shape in arg_shapes]))
# init with pretrained weight
# _prepare_model()
pretrained = mx.nd.load("./model/vgg19.params")
for name in arg_names:
if name == "data":
Expand Down

0 comments on commit 7b575fd

Please sign in to comment.