(self, in_features, hidden_size, num_tokens=120)
| 780 | """ |
| 781 | |
| 782 | def __init__(self, in_features, hidden_size, num_tokens=120): |
| 783 | super().__init__() |
| 784 | self.linear_1 = nn.Linear(in_features=in_features, out_features=hidden_size, bias=True) |
| 785 | self.act_1 = nn.GELU(approximate="tanh") |
| 786 | self.linear_2 = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=True) |
| 787 | |
| 788 | def forward(self, caption): |
| 789 | hidden_states = self.linear_1(caption) |