You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/01/09 02:05:00 UTC

[GitHub] [incubator-mxnet] Justobe edited a comment on issue #17250: mxnet.base.MXNetError: Error in operator transpose176: [02:14:06] src/operator/tensor/./matrix_op-inl.h:354: Check failed: shp.ndim() == param.axes.ndim() (-1 vs. 4)

Justobe edited a comment on issue #17250: mxnet.base.MXNetError: Error in operator transpose176: [02:14:06] src/operator/tensor/./matrix_op-inl.h:354: Check failed: shp.ndim() == param.axes.ndim() (-1 vs. 4)
URL: https://github.com/apache/incubator-mxnet/issues/17250#issuecomment-572346111
 
 
   @ptrendx I really appreciate your reply! I got another exception when I changed the version from 1.5 to 1.6 (both the version you provided and version mxnet-cu101_1.6.0b20191122). I reconfirmed that this exception only occur on the MXNET backend.
   
   > /root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py:94: UserWarning: MXNet Backend performs best with `channels_first` format. Using `channels_last` will significantly reduce performance due to the Transpose operations. For performance improvement, please use this API`keras.utils.to_channels_first(x_input)`to transform `channels_last` data to `channels_first` format and also please change the `image_data_format` in `keras.json` to `channels_first`.Note: `x_input` is a Numpy tensor or a list of Numpy tensorRefer to: https://github.com/awslabs/keras-apache-mxnet/tree/master/docs/mxnet_backend/performance_guide.md
   >   train_symbol = func(*args, **kwargs)
   > /root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py:97: UserWarning: MXNet Backend performs best with `channels_first` format. Using `channels_last` will significantly reduce performance due to the Transpose operations. For performance improvement, please use this API`keras.utils.to_channels_first(x_input)`to transform `channels_last` data to `channels_first` format and also please change the `image_data_format` in `keras.json` to `channels_first`.Note: `x_input` is a Numpy tensor or a list of Numpy tensorRefer to: https://github.com/awslabs/keras-apache-mxnet/tree/master/docs/mxnet_backend/performance_guide.md
   >   test_symbol = func(*args, **kwargs)
   > /root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py:94: UserWarning: MXNet Backend uses `channels_first` format. Axis for BatchNorm should ideally be `1`.Provided - `-1`. Performance can be significantly lower!
   >   train_symbol = func(*args, **kwargs)
   > /root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py:97: UserWarning: MXNet Backend uses `channels_first` format. Axis for BatchNorm should ideally be `1`.Provided - `-1`. Performance can be significantly lower!
   >   test_symbol = func(*args, **kwargs)
   > Traceback (most recent call last):
   >   File "crash_checker.py", line 44, in <module>
   >     model = keras.models.load_model(file_path,custom_objects=custom_objects())
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py", line 496, in load_model
   >     model = _deserialize_model(f, custom_objects, compile)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py", line 302, in _deserialize_model
   >     model = model_from_config(model_config, custom_objects=custom_objects)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py", line 535, in model_from_config
   >     return deserialize(config, custom_objects=custom_objects)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize
   >     printable_module_name='layer')
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
   >     list(custom_objects.items())))
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/sequential.py", line 301, in from_config
   >     model.add(layer)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/sequential.py", line 181, in add
   >     output_tensor = layer(self.outputs[0])
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/base_layer.py", line 470, in __call__
   >     output = self.call(inputs, **kwargs)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/layers/convolutional.py", line 175, in call
   >     dilation_rate=self.dilation_rate)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py", line 3705, in conv2d
   >     padding_mode=padding, data_format=data_format)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py", line 94, in func_wrapper
   >     train_symbol = func(*args, **kwargs)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py", line 5047, in _convnd
   >     filter_dilation)
   >   File "/root/anaconda3/lib/python3.6/site-packages/keras/backend/mxnet_backend.py", line 4870, in _preprocess_padding_mode
   >     for i in range(nd)])
   > ValueError: not enough values to unpack (expected 3, got 0)
   

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


With regards,
Apache Git Services