问题描述:
【功能模块】
在训练时报错,提示算子不支持gpu类型
【操作步骤&问题现象】
1、开始训练,加载数据,走到train时就报错
【截图信息】
[EXCEPTION] DEVICE(35811,7f3f576f62c0,python):2022-03-03-07:28:44.866.790 [mindspore/ccsrc/runtime/device/gpu/kernel_info_setter.cc:83] SupportedTypeList] Unsupported op [Ceil] on GPU
Traceback (most recent call last):
File "train.py", line 477, in
train(train_paths, s3Client, trainlog, valid_paths)
File "train.py", line 373, in train
train_model(train_x, train_y)
File "/root/miniconda3/envs/py3/lib/python3.7/site-packages/mindspore/nn/cell.py", line 407, in __call__
out = self.compile_and_run(*inputs)
File "/root/miniconda3/envs/py3/lib/python3.7/site-packages/mindspore/nn/cell.py", line 734, in compile_and_run
self.compile(*inputs)
File "/root/miniconda3/envs/py3/lib/python3.7/site-packages/mindspore/nn/cell.py", line 721, in compile
_cell_graph_executor.compile(self, *inputs, phase=self.phase, auto_parallel_mode=self._auto_parallel_mode)
File "/root/miniconda3/envs/py3/lib/python3.7/site-packages/mindspore/common/api.py", line 551, in compile
result = self._graph_executor.compile(obj, args_list, phase, use_vm, self.queue_name)
RuntimeError: mindspore/ccsrc/runtime/device/gpu/kernel_info_setter.cc:83 SupportedTypeList] Unsupported op [Ceil] on GPU
解答:
可以用mindspore.numpy.ceil 或者你自己实现一个:
ceil(x) = -floor(-x)
【python|【mindspore】【算子不支持GPU】Unsupported op [Ceil] on GPU】ops.Floor算子是支持全平台的。
推荐阅读
- 软件测试|部门来了个测试开发,听说是00后,上来一顿操作给我看呆了...
- Python随笔|赋值、浅拷贝和深拷贝
- Python|用Python收集这些视频只是单纯的想做做壁纸,大家不要误会
- Notebook|Jupyter Notebook介绍、安装及使用教程
- jupyter|jupyter notebook设置标题折叠
- python|python jupyter notebook运行没反应_jupyter notebook常见问题解决办法
- 计算机技术|Python开发之jupyter notebook使用详解
- Python__Django3.2框架
- Python之读写Excel