I want to make CNN model including multiple inputs. But there is not any examples about that. Without Keras
, Can I make multiple inputs model ?
My model has 3 inputs. After the first input(atom_in_fea[8,9]
) passes through the embedding(linear or dense in keras) layer, the output should merge with the second(nbr_fea_idx[8,12]
) and third input(nbr_fea[8,12,4]
).
atom_in_fea[8,9] -> embedding layer -> atom_in_fea[8,4]
[] is their shape.
There is my code
python, tensorflow
atom_nbr_fea = atom_in_fea[nbr_fea_idx, :]
final = tf.concat([atom_in_fea.unsqueeze(1).expand(8, 12, 4),atom_nbr_fea, nbr_fea], 2)
atom_nbr_fea shape is [8,12,4]
Final shape is [8,12,12]
I built a model with Keras
but there was limited.
If I can solve this problem, it's fine whether it's Keras
or TensorFlow
. Thank you