我有一个带有以下代码的简单RNN模型:
s_input = Input((window_size, ), dtype='int32', name='S')
t_input = Input((window_size, ), dtype='int32', name='T')
emb1 = Embedding(nb_points + 1, emb_size1)
emb2 = Embedding(tm_length + 1, emb_size2)
xe = emb1(s_input)
he = emb2(t_input)
x = Concatenate()([xe, he])
x = SimpleRNN(rnn_size)(x)
y = Dense(nb_points, activation='softmax')(x)
model = Model([s_input, t_input], y)
model.compile('adadelta', 'categorical_crossentropy', metrics=['accuracy'])
return model
当我尝试使用并调用模型时。我有这个模型摘要:
Layer (type) Output Shape Param # Connected to
==================================================================================================
S (InputLayer) (None, 2) 0
__________________________________________________________________________________________________
T (InputLayer) (None, 2) 0
__________________________________________________________________________________________________
embedding_32 (Embedding) (None, 2, 100) 500 S[0][0]
__________________________________________________________________________________________________
embedding_33 (Embedding) (None, 2, 6) 150 T[0][0]
__________________________________________________________________________________________________
concatenate_15 (Concatenate) (None, 2, 106) 0 embedding_32[0][0]
embedding_33[0][0]
__________________________________________________________________________________________________
simple_rnn_10 (SimpleRNN) (None, 20) 2540 concatenate_15[0][0]
__________________________________________________________________________________________________
dense_4 (Dense) (None, 4) 84 simple_rnn_10[0][0]
==================================================================================================
Total params: 3,274
Trainable params: 3,274
Non-trainable params: 0
_________________________________________________________________________________________________
但是,对于每个时期,它都不会给出任何准确性和丢失的结果。只打印这样的东西:
Train on 40 samples, validate on 11 samples
Epoch 1/100
Processing user 1.
有人可以帮助我吗?纪元的结果未打印。