I am using tensorflow to train two instances of the same neural network with two different datasets. the network itself is quite simple with an input and output layer and 6 hidden layers (each layer is a 20 meurons followed by a non-linear activation function).

I can train the network with two different datasets and that is fine. Now, what i want to do is basically create a new network which is a combination of these two trained networks. In particular, I want the input and the first 3 layers to be from one of the trained network and the last 3 layers and the output layer to be from the other network. I am very new to tensorflow and have not found a way to do this. Can someone point me to the API or some way to do this sort of hybrid networks?

  • $\begingroup$ Follow the procedure for transfer learning but do not retrain the last layers and you will have this. I think this is quite possible with Keras but I don't know if that will give good results $\endgroup$ – Pedro Henrique Monforte Apr 11 at 16:44

It seems merging two neural networks does not make any sense. You may instead train one deep R-CNN or with just 2 different NN trained, You may classify as for a test case,if outputs of both NN agree, then output the common output, else the NN which outputs 1, its precision and NN which outputs -1, ratio of its correct negatives to total cases which it predicted negative(calculated in training), whichever is greater, output that NN's output.

Hope these articles will help you.



http://blog.revolutionanalytics.com/2016/09/deep-learning-part-3.htmlenter link description here


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.