No loop matching the specified signature and casting...

tensorboard运行报错:

np.greater 

No loop matching the specified signature and casting....

主要是数据类型对不上,

一般的解决方法,把数据类型设置一致即可,

A = A.astype(np.float32)

print(A.dtype)

临时方法:

1.24版本开始数据类型要求更严了,

pip install numpy==1.23

其他的例子:

原文链接:https://blog.csdn.net/SHAOYEZUIZUISHAUI/article/details/90488012

数据类型:

x_train = np.array(x_train)
x_test = np.array(x_test)
 
#normalize inputs between[0,1]
x_train/=255
x_test/=255


上式会报错

改成下式就好了

x_train = np.array(x_train,'float32')
x_test = np.array(x_test,'float32')
 
#normalize inputs between[0,1]
x_train/=255
x_test/=255


 

你可能感兴趣的:(python基础,numpy,python)