'threadsafe_iter' object has no attribute 'ndim'

history = model.fit(TrainDataGen,
validation_data=(np.array(LM_val), np.array(y_val)),
epochs=n_epochs,
verbose=0,
callbacks=[ca, checkpoint])
程序在这一直报错AttributeError: 'threadsafe_iter' object has no attribute 'ndim'这个错误,有人知道吗

你需要把错误的地方截个图,光从你说的报错,可能是调用包包的时候threadsafe_iter里面错误引用了ndim的方法或者变量,但是具体还是要看整个错误链和具体出错的位置