Skip to content

Commit

Permalink
Remove unused code from module
Browse files Browse the repository at this point in the history
  • Loading branch information
fmassa authored and apaszke committed Feb 2, 2017
1 parent 75aeb16 commit 833b8cb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions torch/nn/modules/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ def __init__(self):
self._forward_hooks = OrderedDict()
self._modules = OrderedDict()
self.training = True
for name, param in self._parameters.items():
if not isinstance(param, Parameter):
if isinstance(param, Variable):
raise TypeError("can't use a Variable as a module "
"parameter. Convert it to torch.nn.Parameter first.")
if param is not None:
param = Parameter(param)
self._parameters[name] = param

def forward(self, *input):
"""Defines the computation performed at every call.
Expand Down

0 comments on commit 833b8cb

Please sign in to comment.