in various places in the codebase we have tensor ops like expand_as(). given the extended broadcasting functionality in the latest version of pytorch, some of these may be unnecessary and/or clunky. more generally, we should investigate and deal with any pytorch warnings that popped once once we switched pytorch versions. for example:
_UserWarning: other is not broadcastable to self, but they have the same number of elements. Falling back to deprecated pointwise behavior._
@jpchen ; ) ?
some of these you dont want to remove, as broadcasting matches from the last index backwards and in lot of the cases, expand_as is doing the right thing. will need to check all of them. That warning actually looks like we need more, not less expands, since pt no longer does automatic pointwise operations.
i can take a look at this next week
errors (that are worth fixing) seem to be in examples.
most of these warnings can be ignored, only the ones using deprecated functionalities should be addressed.
Most helpful comment
some of these you dont want to remove, as broadcasting matches from the last index backwards and in lot of the cases, expand_as is doing the right thing. will need to check all of them. That warning actually looks like we need more, not less expands, since pt no longer does automatic pointwise operations.
i can take a look at this next week