otImplementedError Traceback (most recent call last)
in
4 for j in [5,4,3,2]:
5 p =j
----> 6 RunFun()
in RunFun()
42 temp_labels.append(temp_labels_one_hot)
43 print(type(temp_images))
---> 44 temp_images = fluid.dygraph.to_variable(np.asarray(temp_images))#转换成tensor才能输入
45 print(type(temp_images))
46 temp_labels = fluid.dygraph.to_variable(\
in to_variable(value, name, zero_copy, dtype)
~/anaconda3/lib/python3.8/site-packages/paddle/fluid/wrapped_decorator.py in __impl__(func, *args, **kwargs)
23 def __impl__(func, *args, **kwargs):
24 wrapped_func = decorator_func(func)
---> 25 return wrapped_func(*args, **kwargs)
26
27 return __impl__
~/anaconda3/lib/python3.8/site-packages/paddle/fluid/framework.py in __impl__(*args, **kwargs)
225 assert in_dygraph_mode(
226 ), "We only support '%s()' in dynamic graph mode, please call 'paddle.disable_static()' to enter dynamic graph mode." % func.__name__
--> 227 return func(*args, **kwargs)
228
229 return __impl__
~/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/base.py in to_variable(value, name, zero_copy, dtype)
701 value = value.astype(dtype)
702
--> 703 py_var = core.VarBase(
704 value=value,
705 place=framework._current_expected_place(),
NotImplementedError: (Unimplemented) Invalid dimension to be accessed. Now only supports access to dimension 0 to 9, but received dimension is 32. (at /paddle/paddle/fluid/framework/ddim.h:54)
同样的代码两个服务器,一个正常,一个报错。 list.append 方法的运行结果居然会不一样。一个每次都增加1个维度,另个一就没这个错误。-,-
检查下两个服务器的paddle版本
我还遇到过gpu与cpu的api行为不同的情况。