Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pytorch/tutorials
/ Lambda
Class
Lambda
beginner_source/nn_tutorial.py:742–748 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
740
# ``Sequential``.
741
742
class
Lambda(nn.Module):
743
def
__init__(self, func):
744
super().__init__()
745
self.func = func
746
747
def
forward(self, x):
748
return
self.func(x)
749
750
751
def
preprocess(x):
Callers
1
nn_tutorial.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected