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

2 visualizzazioni (ultimi 30 giorni)
Alex B
Alex B il 5 Mar 2025
Risposto: Matt J il 5 Mar 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 Commenti
Alex B
Alex B il 5 Mar 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 il 5 Mar 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)

Accedi per commentare.

Risposte (1)

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

Categorie

Scopri di più su Image Data Workflows in Help Center e File Exchange

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by