NoneType' object has no attribute '_inbound_nodes'

前端 未结 1 1051
醉梦人生
醉梦人生 2021-01-21 12:44

Hi I am trying to build a Mixture-of-experts neural network. I found a code here: http://blog.sina.com.cn/s/blog_dc3c53e90102x9xu.html. My goal is that the gate and expert come

相关标签:
1条回答
  • 2021-01-21 13:33

    Well, you need to put tf.multiply() inside a Lambda layer to get a Keras Tensor as output (and not a Tensor):

    output = Lambda(lambda x: tf.multiply(x[0], x[1]))([gate, expert])
    
    0 讨论(0)
提交回复
热议问题