MindSpore:The operation does not support the type [kMetaTypeNone, Tesor...
1 报错描述
1.1 系统环境
Environment(Ascend/GPU/CPU): GPU-GTX3090(24G)
Software Environment:
– MindSpore version (source or binary): 1.7.0
– Python version (e.g., Python 3.7.5): 3.8.13
– OS platform and distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
– CUDA version : 11.0
1.2 基本信息
1.2.1脚本
此代码是ConvLSTM从PyTorch迁移到MindSpore的一部分,下面为报错部分
loss = train_network(data, label)
1.2.2报错
部分个人信息做遮挡处理
[WARNING] ME(124028:139969934345984,MainProcess):2022-07-23-20:21:12.940.089 [mindspore/run_check/_check_version.py:140]
MindSpore version 1.7.0 and cuda version 11.0.221 does not match, please refer to the installation guide for version ma
tching information: https://www.mindspore.cn/install
[CRITICAL] ANALYZER(124028,7f4d4a374700,python):2022-07-23-20:21:21.559.937 [mindspore/ccsrc/frontend/operator/composite
/multitype_funcgraph.cc:160] GenerateFromTypes] The 'sub' operation does not support the type [kMetaTypeNone, Tensor[Flo
at32]].
The supported types of overload function `sub` is: [Tensor, List], [Tensor, Tuple], [List, Tensor], [Tuple, Tensor], [Te
nsor, Number], [Number, Tensor], [Tensor, Tensor], [Number, Number].
Traceback (most recent call last):
File "main.py", line 194, in <module>
train()
File "main.py", line 142, in train
loss = train_network(data, label)
File "/home/xxxlab/anaconda2/envs/mindspore/lib/python3.8/site-packages/mindspore/nn/cell.py", line 586, in __call__
out = self.compile_and_run(*args)
File "/home/xxxlab/anaconda2/envs/mindspore/lib/python3.8/site-packages/mindspore/nn/cell.py", line 964, in compile_an
d_run
self.compile(*inputs)
File "/home/xxxlab/anaconda2/envs/mindspore/lib/python3.8/site-packages/mindspore/nn/cell.py", line 937, in compile
_cell_graph_executor.compile(self, *inputs, phase=self.phase, auto_parallel_mode=self._auto_parallel_mode)
File "/home/xxxlab/anaconda2/envs/mindspore/lib/python3.8/site-packages/mindspore/common/api.py", line 1006, in compil
e
result = self._graph_executor.compile(obj, args_list, phase, self._use_vm_mode())
RuntimeError: mindspore/ccsrc/frontend/operator/composite/multitype_funcgraph.cc:160 GenerateFromTypes] The 'sub' operat
ion does not support the type [kMetaTypeNone, Tensor[Float32]].
The supported types of overload function `sub` is: [Tensor, List], [Tensor, Tuple], [List, Tensor], [Tuple, Tensor], [Te
nsor