同じタイプの変数が複数の場所で使用されているかどうかをチェックする Theano のスキャン関数内のチェックが原因で、エラーが発生します。(N, 1)
この関数は、col TensorType の a を行列と交換することを許可しません(N, 1)
(以下のエラーを参照)。
(N, 1)
TensorType のTensor をcol
TensorTypeにキャスト/変換するにはどうすればよいmatrix
ですか?
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.")