train bigger set

master 0.57
ml server 2020-01-17 12:26:59 -07:00
parent 2c3ac4b524
commit d39a4a30ec
1 changed files with 11 additions and 55 deletions

View File

@ -259,8 +259,8 @@
"outputs": [],
"source": [
"print(\"Reduce training and validation set when testing\")\n",
"total_train = 100\n",
"total_val = 100\n",
"#total_train = 100\n",
"#total_val = 100\n",
"print(\"Train =\")\n",
"print(total_train)\n",
"print(\"Validation =\")\n",
@ -277,9 +277,15 @@
"#batch_size = 128\n",
"#epochs = 6\n",
"#\n",
"# Large Test\n",
"#batch_size = 512 # FAIL\n",
"#batch_size = 256 # FAIL\n",
"batch_size = 192\n",
"epochs = 16\n",
"#\n",
"# Testing, faster more inaccurate results\n",
"batch_size = 16\n",
"epochs = 3"
"#batch_size = 16\n",
"#epochs = 3"
]
},
{
@ -318,17 +324,6 @@
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"test_image_generator = ImageDataGenerator(\n",
" rescale=1./255\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -354,27 +349,6 @@
" class_mode='binary')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(test_dir)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"test_data_gen = test_image_generator.flow_from_directory(batch_size=batch_size,\n",
" directory=test_dir,\n",
" target_size=(IMG_HEIGHT, IMG_WIDTH),\n",
" class_mode='binary')"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -393,15 +367,6 @@
"sample_val_images, _ = next(val_data_gen)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"sample_test_images, _ = next(test_data_gen)"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -437,15 +402,6 @@
"plotImages(sample_val_images[0:3])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plotImages(sample_test_images[0:3])"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -618,7 +574,7 @@
"metadata": {},
"outputs": [],
"source": [
"model.save('data/wut.h5')"
"model.save('data/hdf/wut-train.h5')"
]
},
{