xmartlabs / Bender

Easily craft fast Neural Networks on iOS! Use TensorFlow models. Metal under the hood.

Home Page:https://xmartlabs.github.io/Bender/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get the weight of each layer of neural network

baihualinxin opened this issue · comments

styleNet = Network(device: device, inputSize: inputSize, parameterLoader: loader)

styleNet.start
->> Convolution(size: ConvSize(outputChannels: 32, kernelSize: 9, stride: 1), id: “conv1”)
->> Convolution(size: ConvSize(outputChannels: 64, kernelSize: 3, stride: 2), id: “conv2”)
->> Convolution(size: ConvSize(outputChannels: 128, kernelSize: 3, stride: 2), id: “conv3”)
->> Residual(size: ConvSize(outputChannels: 128, kernelSize: 3, stride: 1), id: “res_block1”)
->> Residual(size: ConvSize(outputChannels: 128, kernelSize: 3, stride: 1), id: “res_block2”)
->> Residual(size: ConvSize(outputChannels: 128, kernelSize: 3, stride: 1), id: “res_block3”)
->> Residual(size: ConvSize(outputChannels: 128, kernelSize: 3, stride: 1), id: “res_block4”)
—>> ConvTranspose(size: ConvSize(outputChannles: 64, kernelSize: 3, stride: 2), id: “convt1”)
—>> ConvTranspose(size: ConvSize(outputChannles: 32, kernelSize: 3, stride: 2), id: “convt2”)
->> Convolution(size: ConvSize(outputChannels: 3, kernelSize: 9, stride: 1), neuron: .tanh, id: “convFinal”)

1.I want to do two pool layers for the add operation
How to get the weight of each layer of neural network?
2.Model.run the self? .network. Run is going to be returned to tensor, I need to take care of it, don't return the label?