MCPcopy Create free account
hub / github.com/PrathamLearnsToCode/paper2code / forward

Function forward

skills/paper2code/scaffolds/model_template.py:65–76  ·  view source on GitHub ↗

Args: x: {{description}} — shape: (batch, {{dims}}) Returns: {{description}} — shape: (batch, {{dims}})

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

63 pass # REPLACE with actual layers
64
65 def forward(self, x: torch.Tensor) -> torch.Tensor:
66 """
67 Args:
68 x: {{description}} — shape: (batch, {{dims}})
69
70 Returns:
71 {{description}} — shape: (batch, {{dims}})
72 """
73 # §{{SECTION}} — forward pass
74 # Every tensor operation gets a shape comment:
75 # x = self.linear(x) # (batch, seq_len, d_model) -> (batch, seq_len, d_ff)
76 pass # REPLACE with actual forward pass
77
78
79class {{COMPONENT_B}}(nn.Module):

Callers 1

loss_template.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected