Neural network construction where different outputs have different dependencies on the inputs

조회 수: 1 (최근 30일)
I want to construct a neural network for a system which is described by the image below. The arrows in the images shows the dependencies of the variables in the system (e.g., is dependent on ). I have two inputs and and outputs and , ,..., , . Three intermediate variables , and connect the inputs and outputs together, while the outputs , ,..., , have dependencies sequentially and is dependent on all the . How can I construct a neural network where the inputs are and and the outputs are and , ,..., , ?
  댓글 수: 1
Ben
Ben 2024년 4월 9일
The diagram suggests depends on and depend on (via ). Could you clarify how the simultaneous dependency should be handled?
One way might be a recurrent style network - all the variables are actually time series, and depends on , while depend on . You would hook up a neural network with the and as outputs and write code to feed the back into the network at the next time step.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jayanti
Jayanti 2024년 10월 3일
Hi Xuming,
You can start by defining all the layer component with appropriate size. Let’s assume you have input layer of size 10 (you can choose according to your requirement).
x_A = featureInputLayer(10, 'Name', 'x_a');
Similarly, you can create another input layer .
Now you can create intermediate layer of (suppose) size=20.
I_1 = fullyConnectedLayer(20, 'Name', 'I_1');
Similarly create other two layers and .
For explanation, I am assuming n=3 that is we have three layers which is referred as , and . You can extend this to any value of n. Below code will create layer with size=10.
y_B1 = fullyConnectedLayer(10, 'Name', 'y_b1');
Similarly define for other layers like and , .
Now you need to connect all the layers according to your need. I am attaching the code for your reference.
layers = connectLayers(layers, 'x_a', 'I_1');
layers = connectLayers(layers, 'I_1', 'I_2');
layers = connectLayers(layers, 'I_2', 'I_3');
layers = connectLayers(layers, 'x_b', 'y_b1');
layers = connectLayers(layers, 'x_b', 'y_b2');
layers = connectLayers(layers, 'x_b', 'y_b3');
layers = connectLayers(layers, 'I_3', 'y_b1');
layers = connectLayers(layers, 'y_b1', 'y_a/in1');
layers = connectLayers(layers, 'y_b2', 'y_a/in2');
layers = connectLayers(layers, 'y_b3', 'y_a/in3');
layers = connectLayers(layers, 'y_a', 'I_3');
Also I am attaching the documentation link for various layers for your reference:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by