(self, attrs)
| 19 | self.__dict__ = self |
| 20 | |
| 21 | def override(self, attrs): |
| 22 | if isinstance(attrs, dict): |
| 23 | self.__dict__.update(**attrs) |
| 24 | elif isinstance(attrs, (list, tuple, set)): |
| 25 | for attr in attrs: |
| 26 | self.override(attr) |
| 27 | elif attrs is not None: |
| 28 | raise NotImplementedError |
| 29 | return self |
| 30 | |
| 31 | |
| 32 | class SinusoidalPosEmb(nn.Module): |