Skip to content

Commit

Permalink
bugfix for mode = "both"
Browse files Browse the repository at this point in the history
  • Loading branch information
byronknoll committed Sep 7, 2020
1 parent d215bbd commit 2d9ee55
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tensorflow-compress.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"provenance": [],
"collapsed_sections": [],
"toc_visible": true,
"authorship_tag": "ABX9TyO7Lt6myOfZDaien4SwLBx0"
"authorship_tag": "ABX9TyO9tL2MNcmjnOlaE0tZLeS8"
},
"kernelspec": {
"name": "python3",
Expand Down Expand Up @@ -548,7 +548,8 @@
" coder.finish()\n",
" print(template.format(100, -cross_entropy / length, time.time() - start))\n",
" system_info()\n",
" model.save_weights('./data/model')\n"
" if mode != \"both\" or not compress:\n",
" model.save_weights('./data/model')\n"
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -984,7 +985,7 @@
" download('data/compressed.dat')\n",
" if preprocess == 'nncp':\n",
" download('data/dictionary.words')\n",
" if checkpoint:\n",
" if checkpoint and mode != \"both\":\n",
" download('data/model.index')\n",
" download('data/model.data-00000-of-00001')\n",
" download('data/checkpoint')"
Expand Down

0 comments on commit 2d9ee55

Please sign in to comment.