Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 82f592a

Browse files
author
karllab41
committed
Fixed some small errors
1 parent 255eb69 commit 82f592a

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/notebooks/deep_clustering/DeepClustering_training.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"source": [
6363
"numsources = 2\n",
6464
"batchsize = 256\n",
65+
"fft_size = 512\n",
6566
"datashape = (40, fft_size//2 + 1)"
6667
]
6768
},
@@ -293,7 +294,7 @@
293294
" c_v = model.get_cost(X_vala, y_vala)\n",
294295
" \n",
295296
" # Check if the validation cost is below the minimum validation cost, and if so, save it.\n",
296-
" if c_v < min(v_costs) and len(iterations) > 0:\n",
297+
" if len(v_costs)> 0 and c_v < min(v_costs) and len(iterations) > 0:\n",
297298
" print(\"Saving the model because c_v is\", min(v_costs) - c_v, \"below the old min.\")\n",
298299
" \n",
299300
" # Save the model to the specified path\n",

src/notebooks/lab41model/Lab41Model_training.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"source": [
6363
"numsources = 2\n",
6464
"batchsize = 256\n",
65+
"fft_size = 512\n",
6566
"datashape = (40, fft_size//2 + 1)"
6667
]
6768
},
@@ -295,7 +296,7 @@
295296
" c_v = model.get_cost(Xinv, Ydv, Idv)\n",
296297
" \n",
297298
" # Check if the validation cost is below the minimum validation cost, and if so, save it.\n",
298-
" if c_v < min(v_costs) and len(iterations) > 0:\n",
299+
" if if len(v_costs)>0 and c_v < min(v_costs) and len(iterations) > 0:\n",
299300
" print(\"Saving the model because c_v is\", min(v_costs) - c_v, \"below the old min.\")\n",
300301
" \n",
301302
" # Save the model to the specified path\n",

src/notebooks/pit/PitCnn_training.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
" c_v = sess.run(model.loss, val_data)\n",
309309
" \n",
310310
" # Check if the validation cost is below the minimum validation cost, and if so, save it.\n",
311-
" if len(iterations) > 0 and c_v < min(v_costs):\n",
311+
" if len(v_costs) > 0 and len(iterations) > 0 and c_v < min(v_costs):\n",
312312
" print(\"Saving the model because c_v is\", min(v_costs) - c_v, \"below the old min.\")\n",
313313
" \n",
314314
" # Save the model to the specified path\n",

0 commit comments

Comments
 (0)