“Only absolute URLs are supported” when loading Keras model in Tensorflow.js with loadLayersModel
问题 I want to load a Keras model in Tensorflow.js from a local file, inside a NodeJS server, but I get the following error: "Only absolute URLs are supported". let tf = require("@tensorflow/tfjs"); (async () => { try { const model = await tf.loadLayersModel("/path/to/model.json"); } catch(error) { console.error(error); } })(); Are local files not supported yet with loadLayersModel? Thank you! 回答1: The Tensorflow documentation indicates that you should use direct to your filesystem using the file: