运行 python ppdet/modeling/tests/test_architectures.py,出现警告!
警告:/data4/404a404a/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/tensor/creation.py:125: DeprecationWarning: np.object
is a deprecated alias for the builtin object
. To silence this warning, use object
by itself. Doing this will not modify any behavior and is safe.
根据提示定位至creation.py文件下,第125行如下
elif isinstance(data, (list, tuple)):
data = np.array(data)
if data.dtype == np.object:
更改为
elif isinstance(data, (list, tuple)):
data = np.array(data)
if data.dtype == object:
再次运行验证程序:
错误消失!