Browse Source

Update pytorch.js

Lutz Roeder 4 years ago
parent
commit
1e6dda0316
1 changed files with 1 additions and 1 deletions
  1. 1 1
      source/pytorch.js

+ 1 - 1
source/pytorch.js

@@ -3350,7 +3350,7 @@ pytorch.Utility = class {
                 for (const key of Object.keys(obj)) {
                     const value = obj[key];
                     if (key.indexOf('optim') !== -1 || key.indexOf('opt') !== -1) {
-                        if (value.state && value.param_groups) {
+                        if (value === null || (value.state && value.param_groups)) {
                             continue;
                         }
                     }