Input tensors to a Functional must come from `tf.keras.Input`.

attention_vector = np.mean(get_activations(m,
testing_inputs_1,
print_shape_only=True,
layer_name='attention_vec')[0], axis=2).squeeze()

funcs = [K.function([inp] + [K.learning_phase()], [out]) for out in outputs] # evaluation functions


ValueError: Input tensors to a Functional must come from `tf.keras.Input`. Received: 0 (missing previous layer metadata).







posted @ 2021-02-27 10:47  emanlee  阅读(1550)  评论(2编辑  收藏  举报