0

I am looking at combining two Convolutional Neural Networks into one through element-wise summation of activation functions. Both these networks have different inputs, but are similar in their architecture.

I have seen from certain papers and github pages that this has been, successfully, implemented in Python. However, I was wondering if this would also be possible to implement in MATLAB?

One example of what I want to reproduce is the FuseNet architecture by Hazirbas et al. https://github.com/zanilzanzan/FuseNet_PyTorch:

FuseNet NN architecture by Hazirbas et al.

Is it possible to reproduce this in MATLAB, and if so, how do I start?

Dev-iL
  • 23,742
  • 7
  • 57
  • 99

1 Answers1

0

You might be able to do this using a DAG network1,2 in MATLAB. Here's an illustration:

enter image description here

The element-wise summation, specifically, can be performed using an additionLayer.

Dev-iL
  • 23,742
  • 7
  • 57
  • 99
  • Hi Dev-iL, I was able to reproduce this network. However, since the DAGNetwork only allows for one input, my question then becomes: would it be possible to have a 4-channel input, 3 channels go to one side of the network, and the remaining channel goes to the other side of the network? – Isa El Doori Nov 08 '18 at 17:43
  • @IsaElDoori I don't know of an easy way to achieve that. What you could do, is define a custom layer that does this "unzipping". Basically the reverse of a [depth concatenation layer](https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.depthconcatenationlayer.html). Either that, or a custom layer that all it does is forward certain dimensions (or slices) of the input forward. – Dev-iL Nov 08 '18 at 18:55