tensorspace-team / tensorspace

Neural network 3D visualization framework, build interactive and intuitive model in browsers, support pre-trained deep learning models from TensorFlow, Keras, TensorFlow.js
https://tensorspace.org
Apache License 2.0
5.07k stars 443 forks source link

Add predictDataShapes config in Model #170

Closed syt123450 closed 5 years ago

syt123450 commented 5 years ago

Add predictDataShapes config in model if model's input is dynamically, for example, inceptionv3 model in keras can accept dynamically input shape, if user want to visualize this model in TensorSpace, must config the predictDataShapes in TensorSpace Model.

syt123450 commented 5 years ago

For a dynamically input shape model, for example, inceptionv3 from Keras, must provide input shape for prediction. Use TensorSpace Functional model like:

let model = new TSP.models.Model( modelContainer, {

    inputs: [ input ],
    outputs: [ predictions ],
    predictDataShapes: [ [ 299, 299, 3 ] ]

} );