Discussions>How to create a network with 2 different inputs?>

How to create a network with 2 different inputs?

I'm working on image segmentation and I need to have 2 different inputs of my network. I want to have 1 input for small size images and the other for big size images.
I wonder how I should do it. I need a single model for both sizes, something like this.

2 votesJW326.00
1 Answers

There are a couple of ways to do that but in general, the network has 2 separate branches for each input, and in someplace they are going to be merged. 

You need to have the same size for both inputs in the middle of your networks like you put some convolutional blocks on both inputs, but somewhere in the middle, you will have to resize one of the branch's feature maps and have the same resolution for both of them. After that, you just concatenate them by their channels. Here is how it will look like.

If you already have 2 different feature maps block with the same resolutions, you just put them together for the next layers. You can also have 2 different outputs like it's drawn in the image for corresponding inputs.

Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?