You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/04/09 13:13:42 UTC

[GitHub] [incubator-mxnet] GundamBen opened a new issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

GundamBen opened a new issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147


   ## Description
   
   Getting error that mxnet does not support SaparableConv1d with mxnet 1.5.0 and CUDA 10.1. This error will not occur when running the same code in tensorflow 1.14.0.
   
   ### Error Message
   
   Traceback (most recent call last):
     File "crashModel.py", line 24, in <module>
       model = Lstm()
     File "crashModel.py", line 17, in Lstm
       model.add(SeparableConv1D(filters = 64, kernel_size = (1)))
     File "/root/anaconda3/envs/mxnet/lib/python3.6/site-packages/keras/engine/sequential.py", line 181, in add
       output_tensor = layer(self.outputs[0])
     File "/root/anaconda3/envs/mxnet/lib/python3.6/site-packages/keras/engine/base_layer.py", line 470, in __call__
       output = self.call(inputs, **kwargs)
     File "/root/anaconda3/envs/mxnet/lib/python3.6/site-packages/keras/layers/convolutional.py", line 1393, in call
       dilation_rate=self.dilation_rate)
     File "/root/anaconda3/envs/mxnet/lib/python3.6/site-packages/keras/backend/mxnet_backend.py", line 3773, in separable_conv1d
       raise NotImplementedError('MXNet Backend: Separable Conv1D not supported yet!')
   NotImplementedError: MXNet Backend: Separable Conv1D not supported yet!
   
   ## To Reproduce
   
   import os
   
   os.environ["CUDA_VISIBLE_DEVICES"] = "2"
   os.environ["KERAS_BACKEND"] = 'mxnet'
   
   from keras.models import Sequential
   from keras.layers import Dense, Dropout, Embedding, LSTM, Bidirectional, Reshape, Input, SeparableConv1D, RepeatVector
   
   def Lstm():
       model = Sequential()
       model.add(Embedding(input_dim = 140, output_dim = 128))
       model.add(Bidirectional(LSTM(128)))
       model.add(Dropout(0.5))
       model.add(Dense(64, activation='relu'))
       model.add(Dropout(0.5))
       model.add(RepeatVector(3))
       model.add(SeparableConv1D(filters = 64, kernel_size = (1)))
       model.add(Reshape((192, )))
       model.add(Dense(64, activation='relu'))
       model.add(Dense(2))
       return model
   
   
   model = Lstm()
   model.summary()
   
   ### Steps to reproduce
   (Paste the commands you ran that produced the error.)
   
   1. create a python file and paste code above in it.
   2. set os.environ["KERAS_BACKEND"] = tensorflow and run the file in tensorflow, the model works well.
   3. set os.environ["KERAS_BACKEND"] = mxnet and run the file in mxnet, programme reports an error.
   
   ## What have you tried to solve it?
   
   1. I used to run the file in the version of 1.5.0. When the error occured, I updated mxnet to 1.8.0, but it didn't worked.
   
   ## Environment
   
   <details>
   <summary>Environment Information</summary>
   
   ----------System Info----------
   Platform     : Linux-4.15.0-123-generic-x86_64-with-debian-stretch-sid
   system       : Linux
   node         : 3bb941e39736
   release      : 4.15.0-123-generic
   version      : #126-Ubuntu SMP Wed Oct 21 09:40:11 UTC 2020
   
   ----------Python Info----------
   Version      : 3.6.12
   Compiler     : GCC 7.3.0
   Build        : ('default', 'Sep  8 2020 23:10:56')
   Arch         : ('64bit', '')
   
   mxnet version 1.8.0
   cuda version 10.1
   tensorflow version 1.14.0
   
   </details>
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] szha commented on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
szha commented on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-819956910


   I think the keras-mxnet integration needs update to include depth wise convolution support


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] szha edited a comment on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
szha edited a comment on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-819671607


   I think we do support depthwise convolution. One just needs to set the number of groups to be the same as filters with the convolution op: https://mxnet.apache.org/versions/1.8.0/api/python/docs/api/ndarray/ndarray.html?highlight=convolution#mxnet.ndarray.Convolution
   
   However I'm not familiar with where such support can be added.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] Justobe commented on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
Justobe commented on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-818782732


   @szha @sandeep-krishnamurthy  gentle ping~


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] szha commented on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
szha commented on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-819671607


   I think we do support depthwise convolution. One just needs to set the number of groups to be the same as channels with the convolution op: https://mxnet.apache.org/versions/1.8.0/api/python/docs/api/ndarray/ndarray.html?highlight=convolution#mxnet.ndarray.Convolution
   
   However I'm not familiar with where such support can be added.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] GundamBen commented on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
GundamBen commented on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-819956550


   @szha 
   In this case, the code works in tensorflow and I run the same code in cntk in which it do not crash. to make the code work in mxnet, how should I modify the model? e.g. modifying some parameters?


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] github-actions[bot] commented on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-816674532


   Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue.
   Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly.
   If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on [contributing to MXNet](https://mxnet.apache.org/community/contribute) and our [development guides wiki](https://cwiki.apache.org/confluence/display/MXNET/Developments).


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] GundamBen commented on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
GundamBen commented on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-820384764


   Till keras-mxnet 2.2.4.3, which is the latest version, the crash isn't fixed. 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] szha commented on issue #20147: NotImplementedError!: Separable Conv1D is not supported in current MXNet

Posted by GitBox <gi...@apache.org>.
szha commented on issue #20147:
URL: https://github.com/apache/incubator-mxnet/issues/20147#issuecomment-816706745


   cc @sandeep-krishnamurthy 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org