编译我的脚本会出现此错误:
TypeError: Cannot convert Type TensorType(float64, vector) (of Variable Subtensor{int64:int64:}.0) into Type TensorType(float64, matrix). You can try to manually convert Subtensor{int64:int64:}.0 into a TensorType(float64, matrix).
这是编译器给出错误的代码段:
train = theano.function(
inputs = [index], outputs = cost,
updates = Optimizers_update(cost, Params, self.learning_rate, self.optimizer).run_optimizer(),
givens = { X: train_X[0:index], Y: train_y[0:index] },
allow_input_downcast = True,
mode='DebugMode') # Compile [ call external class Optimizers_update ]
predict_valid = theano.function(inputs = [index], outputs = py_x, givens = { X: test_X[0:index],}, allow_input_downcast = True)
有人有解决方案或建议吗?