30000个输入的5轮训练

Neural Network
30000个输入的5轮训练

整整弄了6个半小时 [Running] python -u “e:\Python projects\CNN try 2\CNN_try_2.py” Input Output Shape Activation Bias Parameters Layer Name
Input Layer (28, 28, 1) (26, 26, 6) tanh True 156 Pool2d1 (26, 26, 6) (13, 13, 6) None False 0 Conv2d2 (13, 13, 6) (9, 9, 16) tanh True 2416 Pool2d3 (9, 9, 16) (4, 4, 16) None False 0 Flatten4 (4, 4, 16) 256 None False 0 FFL5 256 120 tanh True 30840 FFL6 120 100 tanh True 12100 Dropout7 100 100 None False 0 Out layer(FFL) 100 10 softmax True 1010 Total Parameters: 46522

Validation data found.

Total 30000 samples. Training samples: 30000 Validation samples: 200. Total 1000 batches, most batch has 30 samples.

e:\Python projects\CNN try 2\CNN_try_2.py:485: RuntimeWarning: divide by zero encountered in log cse = -np.sum(y * np.nan_to_num(np.log(out), posinf=0, neginf=0) + (1 - y) * np.nan_to_num(np.log(1 - out), posinf=0, neginf=0)) Epoch: 0: Time: 4462.456sec Train Loss: 1619857.6855 Train Accuracy: 27.4533% Val Loss: 11084.8847 Val Accuracy: 28.5%

Epoch: 1: Time: 4421.376sec Train Loss: 1020550.8397 Train Accuracy: 44.7533% Val Loss: 7261.4037 Val Accuracy: 43.5%

Epoch: 2: Time: 4433.644sec Train Loss: 792816.6178 Train Accuracy: 52.8933% Val Loss: 5542.8038 Val Accuracy: 51.5%

Epoch: 3: Time: 4563.832sec Train Loss: 656860.4763 Train Accuracy: 57.37% Val Loss: 4708.6697 Val Accuracy: 53.5%

Epoch: 4: Time: 4598.683sec Train Loss: 573447.1341 Train Accuracy: 60.1733% Val Loss: 4479.9174 Val Accuracy: 56.0%

Model Saved.

[Done] exited with code=0 in 22561.457 seconds