diff --git a/tools/TrainCNN/backward.py b/tools/TrainCNN/backward.py index 29133d6..c4b94b9 100755 --- a/tools/TrainCNN/backward.py +++ b/tools/TrainCNN/backward.py @@ -52,8 +52,8 @@ def save_para(folder, paras, names, info): STEPS = 100000 -BATCH = 50 -LEARNING_RATE_BASE = 0.0005 +BATCH = 40 +LEARNING_RATE_BASE = 0.0003 LEARNING_RATE_DECAY = 0.99 MOVING_AVERAGE_DECAY = 0.99 @@ -98,7 +98,7 @@ def train(dataset, show_bar=False): _, loss_value, step = sess.run( [train_op, loss, global_step], - feed_dict={x: images_samples, y_: labels_samples, keep_rate: 0.4} + feed_dict={x: images_samples, y_: labels_samples, keep_rate: 0.3} ) if step % 500 == 0: diff --git a/tools/TrainCNN/forward.py b/tools/TrainCNN/forward.py index 8489201..bfbfc7c 100644 --- a/tools/TrainCNN/forward.py +++ b/tools/TrainCNN/forward.py @@ -29,19 +29,19 @@ def max_pool_2x2(x): CONV1_KERNAL_SIZE = 5 # 第一层卷积输出通道数 -CONV1_OUTPUT_CHANNELS = 4 +CONV1_OUTPUT_CHANNELS = 6 # 第二层卷积核大小 CONV2_KERNAL_SIZE = 3 # 第二层卷积输出通道数 -CONV2_OUTPUT_CHANNELS = 8 +CONV2_OUTPUT_CHANNELS = 10 # 第三层卷积核大小 CONV3_KERNAL_SIZE = 3 # 第三层卷积输出通道数 -CONV3_OUTPUT_CHANNELS = 12 +CONV3_OUTPUT_CHANNELS = 14 # 第一层全连接宽度 FC1_OUTPUT_NODES = 60