kaivu1999 commented on issue #9392: Official version of MobileNet pretrained 
model and .json file
URL: 
https://github.com/apache/incubator-mxnet/issues/9392#issuecomment-496227740
 
 
   > Sorry, my bad.
   > 
   > ```python
   > net = mx.gluon.model_zoo.vision.mobilenet1_0(pretrained=True)
   > net.hybridize()
   > net(mx.nd.ones((1,3,224,224)))
   > net.export('mobilenet1_0')
   > ```
   
   This works for me as well
   but surprisingly 
   ```
   >>> net.export("resnet18")
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File 
"/home/kaivalya/try/env_try1/lib/python3.5/site-packages/mxnet/gluon/block.py", 
line 885, in export
       "Please first call block.hybridize() and then run forward with "
   RuntimeError: Please first call block.hybridize() and then run forward with 
this block at least once before calling export.
   ```
   
   for 
   ```
   net = models.resnet18_v1(pretrained=True)
   net(mx.nd.ones((1,3,224,224)))
   net.export("resnet18")
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to