-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hi,
I'm trying to instantiate OpenaiTransformer class from openai_transformer.py code in transformer toy problem setting to learn your tsalib a bit. I'm curious to learn how useful tensor shape annotations would be in practice.
However, I've noticed some syntax level errors in code, e.g.:
- in Conv1D.forward() body there is self.nx attribute referenced that is not defined.
- is "def forward(self, x: (B, T, self.nx)) -> torch.Tensor:" syntax valid? It causes a crash
- Attention.forward(self, x: (B, T, self.nx)) -> torch.Tensor: causes a crash "NameError: name 'self' is not defined"
- no TransformerConfig class in source file
- in class OpenaiTransformer.forward(self, x: (B,T)) -> List[B, T, D]:" last part "[B, T, D]" causes a crash "TypeError: Parameters to generic types must be types. Got Batch."
How would you go about correcting these problems?
Best,
Wojtek
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels