You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm leaning mpyc, in demo cnnmnist.py, the para f=6, and force python integer to secnum,
scale = lambda a: secnum(int(round(a * f))) # force Python integers;
why f is set to 6? I test f = 1, 2, the demo also work fine.
The text was updated successfully, but these errors were encountered:
Yeah, indeed, the demo will still work in many cases, but the error rate will go up overall if you take small values for f.
The variable f controls the precision used for the CNN parameters (neuron weights and bias for all layers) of the trained network. For f=6 we get the minimum error rate for the MNIST dataset (around 9915 out of 10000 correct). For f=4 the error rate will also be below 1%, but for f=2 the error rate will be around 25% and for f=1 it should be really high.
To see this, it's best if you run the demo with a (random) batch of say 25 samples, like this:
`python cnnmnist.py 25`
This will also run faster than 25 individual runs because some of the costs are amortized (like loading and converting the weights of the trained network, especially for layer 3 which has 12 MB of weights, see mpyc/demos/data/cnn).
Now you should see more errors for f=2 and certainly for f=1?
Hi, I'm leaning mpyc, in demo cnnmnist.py, the para f=6, and force python integer to secnum,
scale = lambda a: secnum(int(round(a * f))) # force Python integers;
why f is set to 6? I test f = 1, 2, the demo also work fine.
The text was updated successfully, but these errors were encountered: