May the methods in the torch.nn.functional of Pytorch be replaced in Burn in some way? #2794
Unanswered
AutumnRoom
asked this question in
Q&A
Replies: 1 comment 2 replies
-
We have some functional module ops here: https://github.com/tracel-ai/burn/blob/main/crates/burn-tensor/src/tensor/module.rs But |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
May the methods in the torch.nn.functional of Pytorch be replaced in Burn in some way?
Pytorch:
class LayerNorm(nn.Module):
def init(self, channels, eps=1e-5):
super().init()
self.channels = channels
self.eps = eps
def forward(self, x):
x = x.transpose(1, -1)
x = functional.layer_norm(x, (self.channels,), self.gamma, self.beta, self.eps)
return x.transpose(1, -1)
"x = functional.layer_norm(x, (self.channels,), self.gamma, self.beta, self.eps)" can be replace?
Beta Was this translation helpful? Give feedback.
All reactions