facebookresearch / facebookresearch/pytorch3d

Support for higher order derivatives

Open
#382 3 comments 0 reactions 1 assignee Claimed by @bottler View on GitHub
enhancement
Dominant language
Python
Stars
10k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

## 🚀 Feature
Compatibility with calculation of higher derivatives (second or higher). Currently several functions are @once_differentiable

## Motivation
Second derivatives would allow the use of optimisers that require curvature information, and the optimisation of components placed after the renderer to induce properties in the gradients of the inputs to the renderer (my particular application).

## Pitch
In my application, I would like to be able to execute something like the following:
`translationGradients, rotationQuaternionGradients = grad(outputs = pixelLoss, inputs = [translations, rotationQuaternions], grad_outputs = None, retain_graph = True, create_graph = True, only_inputs = True, allow_unused = False) `
`loss = (translationGradients- translationGradientTargets).pow(2).mean() + (rotationQuaternionGradients - rotationGradientTargets).pow(2).mean()`
`loss.backward()`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.