Skip to content

Commit

Permalink
Update segmentation.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
Golbstein authored Aug 10, 2019
1 parent 1d37c21 commit b16282a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"bs = 2\n",
"\n",
"better_model = False\n",
"load_pretrained_weights = True\n",
"\n",
"losses = sparse_crossentropy_ignoring_last_label\n",
"metrics = {'pred_mask' : [Jaccard, sparse_accuracy_ignoring_last_label]}\n",
Expand Down Expand Up @@ -122,14 +121,13 @@
"\n",
"# fine-tune model (train only last conv layers)\n",
"flag = 0\n",
"if load_pretrained_weights:\n"
" for k, l in enumerate(model.layers):\n",
" l.trainable = False\n",
" if l.name == 'concat_projection':\n",
" flag = 1\n",
" if flag:\n",
" l.trainable = True\n",
" \n",
" for k, l in enumerate(model.layers):\n",
" l.trainable = False\n",
" if l.name == 'concat_projection':\n",
" flag = 1\n",
" if flag:\n",
" l.trainable = True\n",
" \n",
"def build_callbacks(tf_board = False):\n",
" tensorboard = TensorBoard(log_dir='./logs/'+SegClass.net, histogram_freq=0,\n",
" write_graph=False, write_images = False)\n",
Expand Down

0 comments on commit b16282a

Please sign in to comment.