ML / Tensorflow beginner.
I'm having trouble trying to get one of the layers from the coco ssd model imported as a package in a React application. I'm following the Pacman tensorflow.js example to retrain the model.
const modelPromise = cocoSsd.load();
Promise.all([modelPromise])
.then(cocoModel => {
console.log(cocoModel[0]);
var cocoModel = cocoModel[0].model;
console.log(cocoModel);
const layer = cocoModel.getLayer('conv_pw_13_relu');
this.truncatedCocoModel = tf.model({inputs: cocoModel.inputs, outputs:
layer.output});
})
.catch(error => {
console.error(error);
});
In the const layer line I get the error message that 'cocoModel.getLayer is not a function'. The Pacman example is using the mobilenet model which I guess has this function.
What are my options here? I looked around using the browser console but I can't find this function anywhere and looking online didn't help much (is there any place online where I can see the whole structure of the cocoSSD model by Google?)