Я получаю сообщение об ошибке из-за проверок внутри функции сканирования Theano, которые проверяют, используется ли один и тот же тип переменной в нескольких местах. Эта функция не позволяет заменять (N, 1)
col TensorType на матрицу (N, 1)
(см. ошибку ниже).
Как преобразовать/преобразовать (N, 1)
Tensor col
TensorType в matrix
TensorType?
TypeError: ('The following error happened while compiling the node', forall_inplace,cpu,scan_fn}(TensorConstant{20}, InplaceDimShuffle{1,0,2}.0, IncSubtensor{InplaceSet;:int64:}.0, IncSubtensor{InplaceSet;:int64:}.0, IncSubtensor{InplaceSet;:int64:}.0, TensorConstant{20}, condpred_1_W_ih, condpred_1_W_ho, embedding_1_W, InplaceDimShuffle{x,0}.0, InplaceDimShuffle{x,0}.0, AdvancedIncSubtensor{inplace=False, set_instead_of_inc=True}.0), '\n', "Inconsistency in the inner graph of scan 'scan_fn' : an input and an output are associated with the same recurrent state and should have the same type but have type 'TensorType(int32, matrix)' and 'TensorType(int32, col)' respectively.")
col
илиmatrix
? - person Autonomous   schedule 17.05.2017col
илиmatrix
. Например, это моя инициализация одного из них:K.zeros((self.batch_size, 1), dtype='int32')
- person pir   schedule 17.05.2017step
. - person pir   schedule 17.05.2017