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

2 visualizaciones (últimos 30 días)
Alex B
Alex B el 5 de Mzo. de 2025
Respondida: Matt J el 5 de Mzo. de 2025
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 comentarios
Alex B
Alex B el 5 de Mzo. de 2025
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 el 5 de Mzo. de 2025
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)

Iniciar sesión para comentar.

Respuestas (1)

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

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by