how to use multiple input layers in DAG net as shown in the figure
33 views (last 30 days)
I have DAG graph with two paths of layers inside it.
I am planning to feed this DAG with two types of data (D1, D2) but I can't do it as the DAG in matlab accept just one input layer.
I need to form a layer such as:
I noticed that there is a custom network that can provide a network with multiple inputs but how can I connect between this network and DAG graph? or how could I use DAG with two inputs?
Mahmoud Afifi on 10 Feb 2019
One idea is to feed the network with concatenated inputs (e.g., image1;image2) then create splitter layers that split each input. The problem here is that you have to feed the network with .mat files, not image paths. Another idea is to store your images as tiff files which can hold 4 channels. In this case, you can store a colored image (3 channel) and a grayscale one. Have a look at this example https://www.mathworks.com/matlabcentral/fileexchange/65065-two-stream-cnn-for-gender-recognition-using-hand-images?s_tid=FX_rc1_behav .. see twoStream.m file.
More Answers (5)
Mahmoud Afifi on 28 Oct 2019
Edited: Mahmoud Afifi on 29 Oct 2019
I just released an example Matlab code of how to implemenet multiple-input CNN in Matlab 2019b. You can find it here:
please if it works for you, accept this answer.
Shounak Mitra on 8 Oct 2018
Hi Marcello and Arjun,
Support for multiple Input layers are not supported as of the 18b release. We are working on it and it should be available soon.
Bernhard Suhm on 12 Dec 2017
Modeling DAG graphs with multiple inputs and/or outputs is currently not supported in our deep learning framework, but we are working on it. So hold your breath for one of the next releases.
Yanhui Guo on 24 Oct 2018
In the DAGNetwork file, I found the property: InputLayerIndices. In the fasterrcnn, I also found two input for this network. I am wondering if matlab2018b has an indirect way to support multiple inputs? Thanks.