Skip to content

"response.arrayBuffer is not a function" while loadLayersModel (Node.js) #2029

Closed
@mrqo

Description

@mrqo

TensorFlow.js version

1.2.9

Browser version

any

Describe the problem or feature request

I have exported a Keras model written in Python, then converted it with tensorflowjs_converter and uploaded it to server. Then, I get error while loading it. I have tried it with @tensorflow/tfjs-node' as well as @tensorflow/tfjs'.

TypeError: response.arrayBuffer is not a function at f:\Developer\x\node_modules\@tensorflow\tfjs-core\dist\io\weights_loader.js:97:90 at Array.map (<anonymous>) at Object.<anonymous> (f:\Developer\x\node_modules\@tensorflow\tfjs-core\dist\io\weights_loader.js:97:48) at step (f:\Developer\x\node_modules\@tensorflow\tfjs-core\dist\io\weights_loader.js:48:23) at Object.next (f:\Developer\x\node_modules\@tensorflow\tfjs-core\dist\io\weights_loader.js:29:53) at fulfilled (f:\Developer\x\node_modules\@tensorflow\tfjs-core\dist\io\weights_loader.js:20:58) at process._tickCallback (internal/process/next_tick.js:68:7)

Code to reproduce the bug / link to feature request

File is publicly available, bin file also resides there.
const tf = require('@tensorflow/tfjs-node');
model = await tf.loadLayersModel('https://storage.googleapis.com/valid-ship-252510.appspot.com/1568271407928-tfjs_model_1/model.json');

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions