if i have an einsum: gamma = gamma.permute(0, 2, 1). cond = torch.einsum("bts,bsd->btd",…
- User
if i have an einsum:
gamma = gamma.permute(0, 2, 1). cond = torch.einsum("bts,bsd->btd", gamma, self.conditioner(txt_pd[:, 1:]))is that the same as:
cond = torch.einsum("bst,bsd->btd", gamma, self.conditioner(txt_pd[:, 1:]))?
Assistant
No, the two
einsumexpressions are not the same due to the difference in the order of dimensions ingamma.In the first expression:
gamma = gamma.permute(0, 2, 1) cond = torch.einsum("bts,bsd->btd", gamma, self.conditioner(txt_pd[:, 1:]))you are permuting the dimensions of
gammafrom(b, t, s)to before performing the operation. This means that will have the shape when it is used in the call.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.