mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

Get NN architecture from .json

Open luatzori opened this issue 10 years ago • 4 comments

Is there any automated way to get the python get_symbol function (i.e. the symbol_alexnet.py in the image-classification example folder ) starting from a json file? My question arises since sometimes there are pretrained models that I would like to train with my dataset.

(Maybe was better to put this question in the pull requests?)

luatzori avatar Apr 22 '16 14:04 luatzori

You can load the json to get a symbol, but not code like in get_symbol functions.

piiswrong avatar Apr 23 '16 04:04 piiswrong

http://mxnet.readthedocs.org/en/latest/packages/python/symbol.html#mxnet.symbol.load_json

tqchen avatar Apr 23 '16 15:04 tqchen

Thank you, so then I can pass it to a fit function to perform the training? I mean something like

net = mx.symbol.load_json(path)
model.fit(args, net, iterator)

and then pass net as the symbol parameter in a mx.model.FeedForward call?

luatzori avatar Apr 26 '16 08:04 luatzori

yes

tqchen avatar Apr 26 '16 16:04 tqchen