DP2 has learned for MNIST, 28 * 28 image data.
The notation of convolution of neural network means the following.
e.g. f (5, 5, 1, 12, 1, 1, 0.5, 0.0001)
Filter size 5 * 5
Input channel 1
Output channel 12
Stride 1
padding 1
rate to multiply initial random number 0.5
Learning rate 0.0001
CNN test for MNIST
defnetwork init_network4(_x) do
_x
|> f(5, 5, 1, 12, 1, 1, 0.5, 0.0001)
|> pooling(2)
|> f(3, 3, 12, 12, 1, 1, 0.5, 0.0001)
|> f(2, 2, 12, 12, 1, 1, 0.5, 0.0001)
|> pooling(2)
|> f(3, 3, 12, 12, 1, 0, 0.5, 0.0001)
|> relu
|> full
|> w(300, 10, 0.1, 0.001)
|> softmax
end
iex(1)> Test.cnn(100,100)
preparing data
learning start
100 13.068114280700684
99 13.220925331115723
98 12.160013198852539
97 12.39694595336914
96 12.35841178894043
95 9.357890129089355
94 10.0624361038208
…
6 6.846850395202637
5 7.928662300109863
4 8.563251495361328
3 6.413776874542236
2 6.471324920654297
1 8.531964302062988
learning end
accuracy rate = 0.398
“time: 47.943411 second”
“-------------”
:ok
I have the code for CIFAR10 in the cifar.ex file. But so far DP2 is not well learned. If you have any advice, thank you.