Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get gradient of input xyz #7

Closed
QtEngineer opened this issue May 21, 2022 · 0 comments
Closed

how to get gradient of input xyz #7

QtEngineer opened this issue May 21, 2022 · 0 comments

Comments

@QtEngineer
Copy link

QtEngineer commented May 21, 2022

I wanted to get grad of input xyz,but function returned None,and requires_grad=True/certain_grad doesnot work.Is it because the input of network concate x and xyz?
def patch_network_forward(self, input,):
xyz = input[:, -original_coordinate_size:]
...,
for layer in range(0, self.num_layers - 1):
lin = getattr(self, "patch_lin" + str(layer))
if layer in self.latent_in:
x = torch.cat([x, input], 1)
elif layer != 0 and self.xyz_in_all:
x = torch.cat([x, xyz], 1)
x = lin(x)
if layer < self.num_layers - 2:
if (
self.norm_layers is not None
and layer in self.norm_layers
and not self.weight_norm
):
bn = getattr(self, "patch_bn" + str(layer))
x = bn(x)
#x = self.softplus(x)
x = self.relu(x)
#x = self.elu(x)
if self.dropout is not None and layer in self.dropout:
x = F.dropout(x, p=self.dropout_prob, training=self.training)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant