You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by GitBox <gi...@apache.org> on 2020/06/02 16:54:43 UTC

[GitHub] [singa] joddiy commented on pull request #697: New Model Layer Operator API

joddiy commented on pull request #697:
URL: https://github.com/apache/singa/pull/697#issuecomment-637678950


   @dcslin Hi, shicong, for some cases of Conv2d, there may be some issues, please use this code to test:
   
   ```
       def _conv2d_helper(self, dev):
           # (out_channels, kernel_size)
           conv_0 = layer.Conv2d(1, 3)
   
           cpu_input_tensor = tensor.Tensor(shape=(1, 1, 5, 5), device=dev)
           cpu_input_tensor.gaussian(0.0, 1.0)
   
           y = conv_0(cpu_input_tensor)  # PyTensor
           self.check_shape(y.shape, (1, 1, 5, 5))
   
       def test_conv2d_cpu(self):
           self._conv2d_helper(cpu_dev)
   
       @unittest.skipIf(not singa_wrap.USE_CUDA, 'CUDA is not enabled')
       def test_conv2d_gpu(self):
           self._conv2d_helper(gpu_dev)
   ```
   The error is :
   > F0602 16:52:21.098649 18959 tensor_math_cuda.h:805] Check failed: status == CURAND_STATUS_SUCCESS (105 vs. 0)  CURAND_STATUS_LENGTH_NOT_MULTIPLE
   
   And the error takes place at this [line](https://github.com/dcslin/singa/blob/py-api/python/singa/layer.py#L479).
   ```
   self.W.gaussian(0.0, std)
   ```
   


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