Guest User

Untitled

a guest
Feb 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import mxnet as mx
  2.  
  3. pretrained_net = mx.gluon.model_zoo.vision.get_model(name='inceptionv3', pretrained=True, classes=1000, prefix='aligcroc_')
  4. net = mx.gluon.model_zoo.vision.get_model(name='inceptionv3', classes=2, prefix='aligcroc_')
  5. net.features = pretrained_net.features
  6. net.output.initialize()
  7.  
  8. batch_size = 1
  9. channels = 3
  10. height = width = 299
  11. data_batch = mx.ndarray.random.normal(shape=(batch_size, channels, height, width))
  12. net(data_batch)
Add Comment
Please, Sign In to add comment