Ver código fonte

Update pytorch.js (#1042)

Lutz Roeder 3 anos atrás
pai
commit
eb1aa3ada6
1 arquivos alterados com 0 adições e 8 exclusões
  1. 0 8
      source/pytorch.js

+ 0 - 8
source/pytorch.js

@@ -2016,10 +2016,6 @@ pytorch.jit.Execution = class extends pytorch.Execution {
                 if (parameter.type === 'Tensor' || (parameter.type === 'Scalar' && pytorch.Utility.isTensor(argument))) {
                     if (Array.isArray(argument) || (!pytorch.Utility.isTensor(argument) && argument !== null && argument !== undefined)) {
                         if (parameter.optional) {
-                            if (argument === undefined) {
-                                copyArgs.shift();
-                                copyEvalArgs.shift();
-                            }
                             continue;
                         }
                         throw new pytorch.Error();
@@ -2464,10 +2460,6 @@ pytorch.jit.Execution = class extends pytorch.Execution {
                         if (parameter.type === 'Tensor' || (parameter.type === 'Scalar' && pytorch.Utility.isTensor(argument))) {
                             if (Array.isArray(argument) || (!pytorch.Utility.isTensor(argument) && argument !== null && argument !== undefined)) {
                                 if (parameter.optional) {
-                                    if (argument === undefined) {
-                                        copyArgs.shift();
-                                        copyEvalArgs.shift();
-                                    }
                                     continue;
                                 }
                                 next = true;