2019-09-26 17:20:54 +00:00
|
|
|
import warnings
|
|
|
|
|
|
|
|
|
|
|
|
def ignore_scalar_return_in_dp():
|
|
|
|
# Users get confused by this warning so we silence it
|
2020-08-07 07:18:29 +00:00
|
|
|
warnings.filterwarnings('ignore', message='Was asked to gather along dimension 0, but all'
|
|
|
|
' input tensors were scalars; will instead unsqueeze'
|
|
|
|
' and return a vector.')
|
2019-09-26 17:20:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
ignore_scalar_return_in_dp()
|