It is possible to add features to internal layer that add additional data to an image, things like where or when or who or temperature other known things that can influence in the prediction?

I think that it must be introduced in the fully connected layers but don't know who to do it. I'm using keras or tensor flow


In Keras this can be obtained by using the Functional API to build a multiple-input model.

In your case, the sequential (or pixel, if you're doing vision) data will be the main_input, processed by CNN; and the additional data will be the aux_input, to which you can apply fully connected layers.

enter image description here

Source: Keras Functional API Documentation

  • $\begingroup$ I suppose that in the graph aux_output is optional and can be removed and main_output will be my labels. And of course the number or rows in the main_input , aux_input and labels must be the same. And the key is keras.layers.concatenate. Thanks @galoosh33 $\endgroup$ – Mquinteiro Jul 4 '17 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.