-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
Description
I still have issues with train / eval. Maybe I'm missing something?
import torch
from torch import nn
nn.Linear(3, 4).eval()This returns this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/guismay/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 174, in eval
p.requires_grad = False
File "/home/guismay/anaconda2/lib/python2.7/site-packages/torch/autograd/variable.py", line 41, in requires_grad
self._requires_grad = value
TypeError: readonly attribute