These are chat archives for dmlc/mxnet

19th
Feb 2018
Sam Hodge
@samhodge
Feb 19 2018 00:45
Hello I need some help converting a Gluon network to a Symbolic network so I can run feedforward on C++
Are there people here with experience in doing that?
and it sounds great
Sam Hodge
@samhodge
Feb 19 2018 00:50
Anirudh Subramanian
@anirudh2290
Feb 19 2018 18:16
@samhodge what is it that you are specifically having difficulty with for converting gluon to symbolic ? Is the mapping of the operators from gluon to symbolic ?
Anirudh Subramanian
@anirudh2290
Feb 19 2018 18:24
Sam Hodge
@samhodge
Feb 19 2018 18:28
I can commit where I am up to, it is converting gluon to symbolic
And the error messages don’t really lead you to the cause of the problem
Anirudh Subramanian
@anirudh2290
Feb 19 2018 18:30
is it possible for you to share reproduce steps ?
do you have any post in the discussion forum https://discuss.mxnet.io/ ?
Sam Hodge
@samhodge
Feb 19 2018 18:46
Yup
I just woke up it is 5:16 am in Adelaide
Let me get coffee and laptop
Anirudh Subramanian
@anirudh2290
Feb 19 2018 18:47
aah sorry about that. found your issue: apache/incubator-mxnet#9813
Sam Hodge
@samhodge
Feb 19 2018 18:49
  File "main.py", line 229, in <module>
    main()
  File "main.py", line 214, in main
    train(args)
  File "main.py", line 82, in train
    style_model.setTarget(style_image)
  File "/Users/sam/dev/incubator-mxnet/example/gluon/style_transfer/net.py", line 236, in setTarget
    F = self.model1(Xs)
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/block.py", line 304, in __call__
    return self.forward(*args)
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/block.py", line 516, in forward
    return self.hybrid_forward(ndarray, x, *args, **params)
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/nn/basic_layers.py", line 111, in hybrid_forward
    x = block(x)
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/block.py", line 304, in __call__
    return self.forward(*args)
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/block.py", line 507, in forward
    params = {i: j.data(ctx) for i, j in self._reg_params.items()}
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/block.py", line 507, in <dictcomp>
    params = {i: j.data(ctx) for i, j in self._reg_params.items()}
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/parameter.py", line 389, in data
    return self._check_and_get(self._data, ctx)
  File "/Users/sam/anaconda2/lib/python2.7/site-packages/mxnet/gluon/parameter.py", line 189, in _check_and_get
    "nested child Blocks"%(self.name,type(self)))
RuntimeError: Parameter net0_instancenorm0_beta <class 'mxnet.gluon.parameter.Parameter'> has not been initialized. Note that you should initialize parameters and create Trainer with Block.collect_params() instead of Block.params because the later does not include Parameters of nested child Blocks
There : samhodge/incubator-mxnet@949993f
I may have no idea what I am doing
here is my command line args
python main.py train --dataset dataset --style-folder images/styles --save-model-dir models --cuda 0
Anirudh Subramanian
@anirudh2290
Feb 19 2018 18:53
i should be able to reproduce the issue by just using your changed example correct ?
Sam Hodge
@samhodge
Feb 19 2018 18:53
yup
you will need to download the images and the model
but repro yes
To be honest I am still learning
but the objective is clear, convert Gluon model to Symbolic model and then run in C++
I am stuck at step 1
@anirudh2290 Thank you for being generous with your time
Sam Hodge
@samhodge
Feb 19 2018 19:33
@anirudh2290 I need to get ready for my day job, I look forward to any pearls of wisdom you might have.
Anirudh Subramanian
@anirudh2290
Feb 19 2018 23:27
@samhodge answered on the issue.