Search code examples
tensorflowtensorflow2.0mnisttensorflow.js

Problem loading model on tensorflowJS, out-of-bounds typedArray on arrayBuffer


when I try to load my trained model from the server using the url I got the following message : error message on attemping to load model

I tried do init the var using new Int8Array and other but nothing work

here my code I try to use :

async function loadModel(){
    let url = window.location.href.replace(window.location.href.substring(window.location.href.lastIndexOf('/') + 1),'');
    let modelJson = await tf.loadLayersModel( url + 'data/model.json');
    let modelBin = await tf.loadLayersModel( url +'data/model.wheights.bin');
}

document.addEventListener('DOMContentLoaded', loadModel);

I have no more idea of what to do ....


Solution

  • Ok, I just figure what goes wrong, the problem was I just rename my file because I made a grammar mistake in the save part, and by changing the name tensorflow couldn't find the linked weight file.