最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

tensorflow - Using an input layer as a weight to a second input layer - Stack Overflow

programmeradmin2浏览0评论

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)
发布评论

评论列表(0)

  1. 暂无评论