The process of training map is as follows :

 

Training results :

Training loss Very low , And the accuracy rate is already very high , But on the validation set ,loss Relatively high , And the accuracy is very low , It's not stable .

 

Causes :

Put the data sets of each category together , And the data tags are also very centralized
model.fit(train_data, train_label, batch_size = 32, epochs = 100,
validation_split = 0.2, shuffle = True)
stay module Of fit Function , Although there are shuffle , But it doesn't feel right , So we still need to scramble the data in advance .

 

resolvent :

Scrambling data , But pay attention , In the middle of chaos , Make sure you mess up the labels , Ensure that the scrambled data and tags are one-to-one correspondence Of .
np.random.seed(200) np.random.shuffle(train_data) np.random.seed(200)
np.random.shuffle(train_label) np.random.seed(200) np.random.shuffle(test_data)
np.random.seed(200) np.random.shuffle(test_label)
Solution results :

theory shuffle The importance of !!!

 

Technology
©2020 ioDraw All rights reserved
Swing actual combat Understanding closure about vue in el-date-picker type=daterange The problem of date not echoing Ubuntu 18.04 swap Partition expansion Snake code --c Language Edition visual c++6.0 open 【Golang Basic series 10 】Go language On conditional sentences ifString class —— summary ,String The nature of , Memory resolution , Commonly used APIAdobe Illustrator Publish native support Apple Silicon Test version of the software study java My first class antd table sort