AttributeError: 'Tensor' object has no attribute '_keras_history'

前端 未结 4 1980
自闭症患者
自闭症患者 2020-12-17 10:36

I looked for all the \"\'Tensor\' object has no attribute ***\" but none seems related to Keras (except for TensorFlow: AttributeError: 'Tensor' object has no attrib

4条回答
  •  温柔的废话
    2020-12-17 11:10

    @'Maëva LC': I can't post a comment, this answers your None issue.

    but the code is working fine without the line

    model1_out = (lambda x: K.round(x), output_shape=...)(model1_out)

    and not anything else. Anyway, thank you for trying.

    Function round() is not differentiable, hence the gradient is None. I suggest you just remove the line.

提交回复
热议问题