错误:模型的输出张量必须是Keras层的输出

时间:2018-10-08 08:48:48

标签: keras

def ttlv[A<:HList](tag:ByteVector, itype:ByteVector, value: Codec[A]): Codec[A] =
    (constant(tag) :~>: constant(itype) :~>: variableSizeBytesLong(uint32, value))

我尝试使用Lambda,也无法正常工作。 这是错误:

  

ValueError:模型的输出张量必须是Keras的输出   for i in range(seq.size(1) - 1):<br> it = seq[:, i].clone()<br> # break if all the sequences end <br> if i >= 1 and seq[:, i].sum() == 0:<br> break <br> output, state = self.get_logprobs_state(it, fc_feats, att_feats, <br> pp_att_feats, att_masks, state) <br> outputs[:, i].assign(output) <br> outputs = tf.convert_to_tensor(outputs) <br> model = Model([inputs_fc, inputs_att, inputs_seq], outputs) <br> (因此保留过去的图层元数据)。发现:   Tensor(“ Variable_1 / read:0”,shape =(10,15,9488),dtype = float32)

0 个答案:

没有答案