Created
March 8, 2019 21:33
-
-
Save kedevked/39832db64f0972581ee648e4152ca0e4 to your computer and use it in GitHub Desktop.
load mobilenet model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const loadedModel = await tf.loadModel('https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v1_0.25_224/model.json') | |
// take whatever layer except last output | |
loadedModel.layers.forEach(layer => console.log(layer.name)) | |
const layer = loadedModel.getLayer('conv_pw_13_relu') | |
return tf.model({ inputs: loadedModel.inputs, outputs: layer.output }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment