mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-mxnet] szha commented on issue #18843: casting Gluon block doesn't work for export
Date Mon, 03 Aug 2020 00:14:52 GMT

szha commented on issue #18843:
URL: https://github.com/apache/incubator-mxnet/issues/18843#issuecomment-667744248


   This works:
   ```python
   import mxnet as mx
   
   net_fp32 = mx.gluon.model_zoo.vision.resnet34_v2(pretrained=True)
   net_fp32.cast('float64')
   net_fp32.hybridize()
   data = mx.nd.zeros((1,3,224,224), dtype='float64')
   net_fp32(data)
   sym_file, params_file = net_fp32.export('test', 0)
   
   sm = mx.sym.load(sym_file)
   inputs = mx.sym.var('data', dtype='float64')
   net_fp64 = mx.gluon.SymbolBlock(sm, inputs)
   net_fp64.load_parameters(params_file)
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message