Closed MLuchmann closed 6 months ago
I think the assertion should be:
assert y.shape[-1:] == torch.Size([self.shapes.y.dim])
as y will have shape (batch_size * #evaluations, y_dim). Note that we put #evaluations into the batch dim.
We could also check for the first dimension (and alike for all other tensors) if we infer the batch_size from the inputs.
I think the assertion should be:
assert y.shape[-1:] == torch.Size([self.shapes.y.dim])
You are completely right.
We could also check for the first dimension (and alike for all other tensors) if we infer the batch_size from the inputs.
The first dimension is merged with #evaluations which can change during inference times (so it won't be equal to self.shapes.y.num any longer). Inferring both from the input: batch size and #evaluations doesn't make much sense I believe. Therefore, I think your first proposal makes the most sense.
Bugfix: PR Fix typo in assertion statement in DeepONet architecture
Description
There was a type in assertion statement.