Args: x: {{description}} — shape: (batch, {{dims}}) Returns: {{description}} — shape: (batch, {{dims}})
(self, x: torch.Tensor)
| 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 | |
| 79 | class {{COMPONENT_B}}(nn.Module): |