feevos commented on issue #16736:
URL: 
https://github.com/apache/incubator-mxnet/issues/16736#issuecomment-698848735


   Dear all, 
   
   using the new version of mxnet (2.0) solves this problem: 
   
   ```python
   In [1]: import mxnet as mx 
      ...: from mxnet import nd, gluon 
      ...: from mxnet.gluon import HybridBlock 
      ...: from mxnet import np, npx 
      ...: npx.set_np() 
      ...: class Demo(HybridBlock): 
      ...:     def __init__(self, kernel_sizes = [3]*17,**kwards): 
      ...:         super().__init__(**kwards) 
      ...:          
      ...:         
      ...:         self.net = gluon.nn.HybridSequential() 
      ...:         for k in kernel_sizes: 
      ...:             
self.net.add(gluon.nn.Conv2D(32,kernel_size=k,padding=1)) 
      ...:                  
      ...:     def forward(self,input): 
      ...:         x = input 
      ...:         for conv in self.net: 
      ...:             x = x + conv(input) 
      ...:         
      ...:         return x 
      ...:  
      ...: # This reproduces the error.  
      ...: nfilters=32 
      ...: F = 256 
      ...:  
      ...: net = Demo(kernel_sizes=[3]*7) # <=== CHANGE HERE, for length of 
list < 7 this script runs fine.   
      ...: net.initialize() 
      ...: net.hybridize() 
      ...: xx = np.random.rand(7,nfilters,F,F) 
      ...: out = net(xx)                                                        
                                                                                
     
   
/usr/local/lib/python3.7/site-packages/joblib/_multiprocessing_helpers.py:45: 
UserWarning: [Errno 28] No space left on device.  joblib will operate in serial 
mode
     warnings.warn('%s.  joblib will operate in serial mode' % (e,))
   [18:14:54] ../src/storage/storage.cc:199: Using Pooled (Naive) 
StorageManager for CPU
   
   In [2]: out = net(xx)                                                        
                                                                                
     
   
   In [3]: out.shape                                                            
                                                                                
     
   Out[3]: (7, 32, 256, 256)
   
   
   ```


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to