keras-js
keras-js copied to clipboard
"Unexpected token |=" when calling Model.predict()
When calling Model.predict()
I get the following error:
Unhandled rejection SyntaxError: Unexpected token |=
SyntaxError: Unexpected token |=
at new Function (<anonymous>)
at generateCWiseOp (webpack:///./~/cwise-compiler/lib/compile.js?:351:11)
at assigns_cwise_thunk (eval at createThunk (webpack:///./~/cwise-compiler/lib/thunk.js?), <anonymous>:7:29)
at Object.assigns_ndarrayops [as assigns] (eval at makeOp (webpack:///./~/ndarray-ops/ndarray-ops.js?), <anonymous>:3:44)
at BatchNormalization._callRegularMode (webpack:///./src/layers/normalization/BatchNormalization.js?:172:30)
at BatchNormalization.call (webpack:///./src/layers/normalization/BatchNormalization.js?:276:21)
at Model._regularLayerCall (webpack:///./src/Model.js?:560:27)
at Model._callee$ (webpack:///./src/Model.js?:643:137)
at tryCatch (webpack:///./~/regenerator-runtime/runtime.js?:65:40)
at Generator.invoke [as _invoke] (webpack:///./~/regenerator-runtime/runtime.js?:303:22)
at Generator.prototype.(anonymous function) [as next] (webpack:///./~/regenerator-runtime/runtime.js?:117:21)
at Generator.tryCatcher (webpack:///./~/bluebird/js/browser/bluebird.js?:5253:23)
at PromiseSpawn._promiseFulfilled (webpack:///./~/bluebird/js/browser/bluebird.js?:2125:49)
at Model.eval (webpack:///./~/bluebird/js/browser/bluebird.js?:2229:15)
From previous event:
at Model._traverseDAG (webpack:///./src/Model.js?:680:21)
at Model._callee2$ (webpack:///./src/Model.js?:790:29)
at tryCatch (webpack:///./~/regenerator-runtime/runtime.js?:65:40)
at Generator.invoke [as _invoke] (webpack:///./~/regenerator-runtime/runtime.js?:303:22)
at Generator.prototype.(anonymous function) [as next] (webpack:///./~/regenerator-runtime/runtime.js?:117:21)
From previous event:
at Model.predict (webpack:///./src/Model.js?:840:22)
It seems like the problematic line is in BatchNormalization.js
:
_ndarrayOps2.default.assigns((_gamma$tensor = _gamma.tensor).pick.apply(_gamma$tensor, broadcast), this.weights.gamma.tensor.get(i));
I'm using Keras 1.1.0 which according to a comment in #49 is the latest supported version (is that accurate?).