Pyro: pytorch broadcasting

Created on 14 Sep 2017  路  3Comments  路  Source: pyro-ppl/pyro

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._

bug

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

All 3 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robsalomone picture robsalomone  路  4Comments

ahmadsalim picture ahmadsalim  路  3Comments

fehiepsi picture fehiepsi  路  4Comments

tristandeleu picture tristandeleu  路  3Comments

jpchen picture jpchen  路  5Comments