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 444 forks source link

Create layer by shape #152

Closed syt123450 closed 5 years ago

syt123450 commented 5 years ago

Make TensorSpace's layer can be created by directly given the shape. For example:

let depthwiseConv2d = new TSP.DepthwiseConv2d({
    shape: [28, 28, 32],
    name: "depthwise_1"
});
syt123450 commented 5 years ago

For 1d layer, use config:

{
    shape: [ 28 ]
}

For 2d layer, use config:

{
    shape: [ 28, 28 ]
}

For 3d layer, use config:

{
    shape: [ 28, 28, 3 ]
}