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

Commit

Permalink
Fixed some small errors
Browse files Browse the repository at this point in the history
  • Loading branch information
karllab41 committed Jun 23, 2017
1 parent 255eb69 commit 82f592a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/notebooks/deep_clustering/DeepClustering_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"source": [
"numsources = 2\n",
"batchsize = 256\n",
"fft_size = 512\n",
"datashape = (40, fft_size//2 + 1)"
]
},
Expand Down Expand Up @@ -293,7 +294,7 @@
" c_v = model.get_cost(X_vala, y_vala)\n",
" \n",
" # Check if the validation cost is below the minimum validation cost, and if so, save it.\n",
" if c_v < min(v_costs) and len(iterations) > 0:\n",
" if len(v_costs)> 0 and c_v < min(v_costs) and len(iterations) > 0:\n",
" print(\"Saving the model because c_v is\", min(v_costs) - c_v, \"below the old min.\")\n",
" \n",
" # Save the model to the specified path\n",
Expand Down
3 changes: 2 additions & 1 deletion src/notebooks/lab41model/Lab41Model_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"source": [
"numsources = 2\n",
"batchsize = 256\n",
"fft_size = 512\n",
"datashape = (40, fft_size//2 + 1)"
]
},
Expand Down Expand Up @@ -295,7 +296,7 @@
" c_v = model.get_cost(Xinv, Ydv, Idv)\n",
" \n",
" # Check if the validation cost is below the minimum validation cost, and if so, save it.\n",
" if c_v < min(v_costs) and len(iterations) > 0:\n",
" if if len(v_costs)>0 and c_v < min(v_costs) and len(iterations) > 0:\n",
" print(\"Saving the model because c_v is\", min(v_costs) - c_v, \"below the old min.\")\n",
" \n",
" # Save the model to the specified path\n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/pit/PitCnn_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
" c_v = sess.run(model.loss, val_data)\n",
" \n",
" # Check if the validation cost is below the minimum validation cost, and if so, save it.\n",
" if len(iterations) > 0 and c_v < min(v_costs):\n",
" if len(v_costs) > 0 and len(iterations) > 0 and c_v < min(v_costs):\n",
" print(\"Saving the model because c_v is\", min(v_costs) - c_v, \"below the old min.\")\n",
" \n",
" # Save the model to the specified path\n",
Expand Down

0 comments on commit 82f592a

Please sign in to comment.