TensorFlow取数据批次的代码中有一句 yield inputs[excerpt], inputsp[excerpt] 编译后报错TypeError: only integer scalar arrays can be converted to a scalar index 改成 yield np.array(inputs)[excerpt], np.array(inputsp)[excerpt]
就可以了。
inputs 和inputsp 都是list,可能是要这样转化为numpy里的array才能用shuffle(indices) 去索引吧。