Skip to content

Conversation

@bmccann
Copy link
Contributor

@bmccann bmccann commented Jan 31, 2017

@bmccann bmccann changed the title Replacing stale references in RNNBase Changes in RNNBase and Embedding for compatibility with DataParallel Feb 1, 2017
@apaszke
Copy link
Contributor

apaszke commented Feb 3, 2017

The PR looks good, but it will break all checkpoints. I think you'd also need to add __setstate__ that will modify the all_weights dict to match the new types.

@apaszke
Copy link
Contributor

apaszke commented Feb 7, 2017

@pytorchbot test this please

@soumith
Copy link
Contributor

soumith commented Feb 7, 2017

ok, last checks the tests are failing. Here's the log:

======================================================================
ERROR: test_RNN_cpu_vs_cudnn_no_dropout (__main__.TestNN)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_nn.py", line 30, in wrapper
    return fn(*args, **kwargs)
  File "test_nn.py", line 1165, in test_RNN_cpu_vs_cudnn_no_dropout
    self._test_RNN_cpu_vs_cudnn(0)
  File "test_nn.py", line 1135, in _test_RNN_cpu_vs_cudnn
    False, rnn, input_val, hx_val, rnn.all_weights)
  File "test_nn.py", line 1062, in forward_backward
    x.data.copy_(y.data)
AttributeError: 'str' object has no attribute 'data'

======================================================================
ERROR: test_RNN_cpu_vs_cudnn_with_dropout (__main__.TestNN)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_nn.py", line 30, in wrapper
    return fn(*args, **kwargs)
  File "test_nn.py", line 1171, in test_RNN_cpu_vs_cu* Closing connection 0
dnn_with_dropout
    self._test_RNN_cpu_vs_cudnn(1)
  File "test_nn.py", line 1135, in _test_RNN_cpu_vs_cudnn
    False, rnn, input_val, hx_val, rnn.all_weights)
  File "test_nn.py", line 1062, in forward_backward
    x.data.copy_(y.data)
AttributeError: 'str' object has no attribute 'data'

@soumith soumith merged commit 6c77fa9 into pytorch:master Feb 9, 2017
@soumith
Copy link
Contributor

soumith commented Feb 9, 2017

thanks for fixing this Bryan!

ashishfarmer added a commit to ashishfarmer/pytorch that referenced this pull request May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants