mxnet infer_shape_entry TypeError:必须为整数

时间:2018-11-27 03:16:33

标签: python mxnet

测试自定义运算符时遇到了infer_shape错误。

错误消息:

Error in <my_operator_name>.infer_shape: Traceback (most recent call last):
  File "~/anaconda2/envs/mx110-py27/lib/python2.7/site-packages/mxnet/operator.py", line 658, in infer_shape_entry
    array('I', rshape[i])),
TypeError: an integer is required

以前有人遇到过同样的问题吗?谢谢!

1 个答案:

答案 0 :(得分:0)

我发现这是因为mxnet.operator.CustomProp的__init__函数仅接受字符串类型的参数。