mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
Dim 0 warning (#256)
* added ignore warnings module * added ignore warnings module * Fixes #249 * Update ignored_warnings.py
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import warnings
|
||||
|
||||
|
||||
def ignore_scalar_return_in_dp():
|
||||
# Users get confused by this warning so we silence it
|
||||
m_1 = """
|
||||
Was asked to gather along dimension 0, but all
|
||||
input tensors were scalars; will instead unsqueeze
|
||||
and return a vector.
|
||||
"""
|
||||
warnings.filterwarnings('ignore', message=m_1)
|
||||
|
||||
|
||||
ignore_scalar_return_in_dp()
|
||||
@@ -22,6 +22,7 @@ from pytorch_lightning.pt_overrides.override_data_parallel import (
|
||||
from pytorch_lightning.callbacks import GradientAccumulationScheduler
|
||||
from pytorch_lightning.utilities.debugging import MisconfigurationException
|
||||
import pdb
|
||||
from pytorch_lightning.trainer import ignored_warnings
|
||||
|
||||
try:
|
||||
from apex import amp
|
||||
|
||||
Reference in New Issue
Block a user