ThomasDelteil commented on a change in pull request #15230: Updating 
SymbolBlock.imports to support different dtypes
URL: https://github.com/apache/incubator-mxnet/pull/15230#discussion_r293515130
 
 

 ##########
 File path: tests/python/unittest/test_gluon.py
 ##########
 @@ -2750,6 +2775,17 @@ def test_gluon_param_load():
     net.cast('float16')
     net.load_parameters('test_gluon_param_load.params', cast_dtype=True)
     mx.nd.waitall()
+    
+@with_seed()
+def test_gluon_param_load_dtype_source():
+    net = mx.gluon.nn.Dense(10, in_units=10)
+    net.initialize()
+    net.cast('float16')
 
 Review comment:
   @pengzhao-intel @xinyu-intel, thanks for the suggestion, I'm actually unable 
to find a single layer in Gluon that supports `int8` or `uint8`. 
   
   ```python
   net = mx.gluon.nn.Conv2D(channels=4, kernel_size=3, in_channels=3)
   net.initialize()
   net.cast(np.uint8)
   net(mx.nd.ones((1,3,224,224), dtype=np.uint8))
   ```
   
   gives me a 
   ```text
   MXNetError: std::exception
   ```
   
   Any suggestions without resorting to symbolically fused graphs?

----------------------------------------------------------------
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