Closed lebron8dong closed 1 year ago
tf.loadGraphModel("https://tfhub.dev/google/tfjs-model/imagenet/mobilenet_v2_050_224/classification/1/default/1", { fromTFHub: true }); tfvis.show.modelSummary({name: 'Model Architecture', tab: 'Model'}, model); error:TypeError: Cannot read properties of undefined (reading 'map')
model.summary(); error:model.summary is not a function
Hi @lebron8dong ,
I apologize for the delay in my response. tf.loadGraphModel
doesn't have a built-in summary()
function. Could you please follow this document? If you need to obtain a summary of the model's structure with a graph model, you can use the model.artifacts.modelTopology
.
modelTopology attribute will provide you with the JSON representation of the model's structure.
Please follow the code-snippet :
const model= await tf.loadGraphModel("https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1",{ fromTFHub: true })
console.log(model.artifacts.modelTopology)
Let me know, if i have missed something. Thank You!
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.
This issue was closed due to lack of activity after being marked stale for past 7 days.
const model=await tf.loadGraphModel("./model.json")//model: https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1 tfvis.show.modelSummary({name: 'Model Architecture', tab: 'Model'}, model); error: Cannot read properties of undefined (reading 'map')
model.summary(); error:model.summary is not a function