Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed May 12, 2020
1 parent 14aaace commit a37cd6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from pytorch_lightning.core.grads import GradInformation
from pytorch_lightning.core.hooks import ModelHooks
from pytorch_lightning.core.memory import ModelSummary
from pytorch_lightning.core.properties import ModuleProperties
from pytorch_lightning.core.properties import DeviceDtypeModuleMixin
from pytorch_lightning.core.saving import ModelIO, load_hparams_from_tags_csv
from pytorch_lightning.overrides.data_parallel import LightningDistributedDataParallel
from pytorch_lightning.utilities.exceptions import MisconfigurationException
Expand All @@ -30,7 +30,7 @@
XLA_AVAILABLE = True


class LightningModule(ABC, ModuleProperties, GradInformation, ModelIO, ModelHooks):
class LightningModule(ABC, DeviceDtypeModuleMixin, GradInformation, ModelIO, ModelHooks):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions pytorch_lightning/core/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


class ModuleProperties(torch.nn.Module):
class DeviceDtypeModuleMixin(torch.nn.Module):
_device: ...
_dtype: Union[str, torch.dtype]

Expand Down Expand Up @@ -57,7 +57,7 @@ def to(self, *args, **kwargs) -> torch.nn.Module:
Module: self
Example::
>>> class ExampleModule(ModuleProperties):
>>> class ExampleModule(DeviceDtypeModuleMixin):
... def __init__(self, weight: torch.Tensor):
... super().__init__()
... self.register_buffer('weight', weight)
Expand Down

0 comments on commit a37cd6d

Please sign in to comment.