fix attributeerror in tutorial part10#2990
Closed
Rachelxuan11 wants to merge 5 commits intoOpenMined:masterfrom
Closed
fix attributeerror in tutorial part10#2990Rachelxuan11 wants to merge 5 commits intoOpenMined:masterfrom
Rachelxuan11 wants to merge 5 commits intoOpenMined:masterfrom
Conversation
|
Check out this pull request on You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB. |
Rachelxuan11
commented
Feb 1, 2020
Comment on lines
+200
to
201
| " epoch, batch_idx * data.shape[0], len(train_loader) * data.shape[0],\n", | ||
| " 100. * batch_idx / len(train_loader), loss.item()))\n", |
Rachelxuan11
commented
Feb 1, 2020
| " for data, target in test_loader:\n", | ||
| " output = model(data)\n", | ||
| " test_loss += F.mse_loss(output.view(-1), target, reduction='sum').item() # sum up batch loss\n", | ||
| " pred = output.data.max(1, keepdim=True)[1] # get the index of the max log-probability\n", |
Contributor
Author
There was a problem hiding this comment.
redundant for this example regression task
Rachelxuan11
commented
Feb 1, 2020
Comment on lines
-461
to
+460
| " spdz_params.append(params[remote_index][param_i].copy().fix_precision().share(bob, alice, crypto_provider=james).get())\n", | ||
| " spdz_params.append(params[remote_index][param_i].copy().get().fix_precision().share(bob, alice, crypto_provider=james)\n", |
Contributor
Author
There was a problem hiding this comment.
avoid the AttributeError
Member
|
It seems that there is an error here (it is lalso present on master, but also in this PR). Do you have some time to investigate :) |
17 tasks
This was referenced Feb 8, 2020
|
This pull request has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Run tutorial Part10 and got the same error as this issue #2758.
This error is shown as follows:
Solution
user
model.copy().get().fix_precision().share(...)instead ofmodel.copy().fix_precision().share(...).get()could avoid this error