How do you change the output dimension of a NN layer?

조회 수: 2 (최근 30일)
Alex B
Alex B 2025년 3월 5일
답변: Matt J 2025년 3월 5일
I am attempting to implement the NeRF2 architecture from this paper. So far, I have the layout of the network working properly, as well as the attenuation network and the radiance network separately. At the moment, my network looks like this:
However, the outputs from relu_8 have shape CB, while the other two inputs to radianceConcat have shape SCB. The AttnReshape layer was supposed to fix this, but I can't figure out how to actually reshape the labels on the data. I've attached the code I'm using below. I am completely at a loss here, any help would be greatly appriciated.
  댓글 수: 8
Alex B
Alex B 2025년 3월 5일
In reply to your response - so what would be the proper way to implement this architecture then? Should I flatten the inputs and then concatenate them similar to this example?
Or would the proper way to do this be to define a custom loss function with multiple inputs and multiple outputs?
Alex B
Alex B 2025년 3월 5일
I wish this forum had a reply button.
To answer your question about inputs:
  • The attenuation network takes an encoded 3d position (of shape [3, 20, 1] (SCB)) and produces a scalar output, representing either the real or complex part of that cells signal attenuation
  • The radiance network produces a singal scalar output representing the real or complex part of a signal transmitted in direction omega, given three inputs:
  • An encoded receiver position (of shape [3, 20, 1] (SCB))
  • An encoded transmission direction (of shape [2, 8, 1] (SCB))
  • The scalar output from the attenuation network (of shape [1,1] with no dimensional labels)

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

답변 (1개)

Matt J
Matt J 2025년 3월 5일
Should I flatten the inputs and then concatenate them similar to this example?
Probably. See if the attached network does what you want.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by