I'm getting the following error when I try to load my trainned model on my web app, the json is reached from the path properly (I've tryed to print with console.log and it's OK), seems that the problem is when tf.loadLayers try to load it...
Vue App Code
import * as tf from '@tensorflow/tfjs';
export default {
data(){
return {
modelJSON: require('../model/jsmodel/model.json'),
}
},
mounted(){
this.loadModel();
},
methods: {
async loadModel(){
this.model = await tf.loadLayersModel(this.modelJSON)
},
...
Error
models.js?411e:207 Uncaught (in promise) Error: Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.
at loadLayersModelFromIOHandler (models.js?411e:207)
at loadLayersModelInternal (models.js?411e:190)
at Module.loadLayersModel (exports.js?79b0:220)
at _callee$ (SingleTweet.vue?b47c:40)
at tryCatch (runtime.js?96cf:63)
at Generator.invoke [as _invoke] (runtime.js?96cf:293)
at Generator.eval [as next] (runtime.js?96cf:118)
at asyncGeneratorStep (asyncToGenerator.js?1da1:3)
at _next (asyncToGenerator.js?1da1:25)
at eval (asyncToGenerator.js?1da1:32)