see if more dense layers help...
" convolve_block(512),\n",
" convolve_block(512),\n",
" tf.keras.layers.GlobalAveragePooling2D(),\n",
+ " tf.keras.layers.Dense(512),\n",
+ " tf.keras.layers.Dense(512),\n",
" tf.keras.layers.Dense(8),\n",
" ]\n",
"\n",
" both_diffs = tf.stack([\n",
" non_flipped_diff, flipped_diff\n",
" ])\n",
- " print(both_diffs)\n",
- " print(min_index)\n",
+ "# print(both_diffs)\n",
+ "# print(min_index)\n",
"\n",
" diff = tf.gather_nd(\n",
" both_diffs, min_index\n",
"# print(loss_function(parameters, parameters + 1))\n",
" \n",
" \n",
- "for parameters, img in create_pipeline_dataset(3).take(1):\n",
+ "for parameters, img in create_pipeline_dataset(5).take(1):\n",
" print(loss_function(parameters, parameters + 0.5))"
]
},
"train_dataset = create_pipeline_dataset(BATCH_SIZE)\n",
"\n",
"\n",
- "\n",
"@tf.function(experimental_relax_shapes=True)\n",
"def train_step(ground_truth_parameters, input_image):\n",
" with tf.GradientTape() as tape:\n",
" for parameters, img in test_ds.take(1):\n",
" results_figures(model, img, parameters)\n",
"\n",
- " iters_per_epoch = 10\n",
+ " iters_per_epoch = 3\n",
" for parameters, img in tqdm.tqdm(train_ds.take(iters_per_epoch), total=iters_per_epoch):\n",
" reduced_loss = concrete_train_step(parameters, img)\n",
" \n",
