admin管理员组文章数量:1316523
I have two inputs structures where each feature in the second input uses the values of input 1 to calculate each of the features. Then the second input layer is then connected to the hidden layers and finally to a single output layer. So lets say I have in the first input A, B, C and in the second G M N O where for instance G is calculated as the sum(A to C) and G M N O are connected to the hidden layers. How do I implement this using tensorflow keras? G M N O is the input layer connected to the hidden layers.
input_elements = Input(shape=(4,), name="Elemental_Composition")
input_descriptors = Input(shape=(7,), name="Descriptors")
combined = concatenate([input_elements, input_descriptors])
hidden = Dense(64, activation="relu")(combined)
output = Dense(1, activation="linear")(hidden)
本文标签: tensorflowUsing an input layer as a weight to a second input layerStack Overflow
版权声明:本文标题:tensorflow - Using an input layer as a weight to a second input layer - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742007249a2412207.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论