AttributeError: 'numpy.dtype' object has no attribute 'base_dtype'
这个错误其实是有说keras版本有点高的问题,我调低了,Keras (2.0.2)
具体他有没有影响,我没有验证
但是下面这个我验证过了:原因说是因为keras希望得到的是一个张量,而不是矩阵,原文看这里
https://stackoverflow.com/questions/57555407/numpy-dtype-object-has-no-attribute-base-dtype-in-keras
self.x_train = x_train
改为
import keras.backend as K
self.x_train = K.constant(x_train)