Skip to content

Commit

Permalink
Merge pull request fastai#145 from bckenstler/master
Browse files Browse the repository at this point in the history
Minor fixes to notebooks
  • Loading branch information
jph00 authored Aug 16, 2017
2 parents cbafbf3 + 714c9f2 commit afb6c4f
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 116 deletions.
4 changes: 2 additions & 2 deletions deeplearning2/DCGAN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
}
],
"source": [
"dl,gl = train(MLP_D, MLP_G, m, 4000)"
"dl,gl = train(MLP_D, MLP_G, MLP_m, 8000)"
]
},
{
Expand Down Expand Up @@ -568,7 +568,7 @@
}
],
"source": [
"dl,gl = train(CNN_D, CNN_G, CNN_m, 250)"
"dl,gl = train(CNN_D, CNN_G, CNN_m, 2500)"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions deeplearning2/babi-memnn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1448,21 +1448,21 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 2",
"language": "python",
"name": "python3"
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"pygments_lexer": "ipython2",
"version": "2.7.13"
}
},
"nbformat": 4,
Expand Down
24 changes: 19 additions & 5 deletions deeplearning2/densenet-keras.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -180,7 +182,9 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -569,6 +573,7 @@
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -649,7 +654,9 @@
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -697,6 +704,7 @@
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -779,6 +787,7 @@
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -900,6 +909,7 @@
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -981,6 +991,7 @@
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -1047,6 +1058,7 @@
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -1123,7 +1135,9 @@
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1174,7 +1188,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.6.2"
}
},
"nbformat": 4,
Expand Down
17 changes: 2 additions & 15 deletions deeplearning2/imagenet_process.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
},
"outputs": [],
"source": [
"model = word2vec.Word2Vec.load_word2vec_format(w2v_path+'.bin', binary=True)\n",
"model = word2vec.KeyedVectors.load_word2vec_format(w2v_path+'.bin', binary=True)\n",
"model.save_word2vec_format(w2v_path+'.txt', binary=False)"
]
},
Expand Down Expand Up @@ -1421,19 +1421,6 @@
"lm.compile('adam','cosine_proximity')"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"v = np.concatenate([vecs, vecs])"
]
},
{
"cell_type": "code",
"execution_count": 68,
Expand All @@ -1455,7 +1442,7 @@
}
],
"source": [
"lm.evaluate(features_last, v, verbose=0)"
"lm.evaluate(features_last, vecs, verbose=0)"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions deeplearning2/kmeans_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -1170,7 +1170,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.6.2"
}
},
"nbformat": 4,
Expand Down
31 changes: 12 additions & 19 deletions deeplearning2/meanshift.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 1,
"metadata": {
"collapsed": false,
"deletable": true,
Expand All @@ -40,21 +40,19 @@
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true,
"heading_collapsed": true
"editable": true
},
"source": [
"## Create data"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true,
"hidden": true
"editable": true
},
"outputs": [],
"source": [
Expand All @@ -66,21 +64,19 @@
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true,
"hidden": true
"editable": true
},
"source": [
"To generate our data, we're going to pick 6 random points, which we'll call centroids, and for each point we're going to generate 250 random points about it."
]
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 3,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true,
"hidden": true
"editable": true
},
"outputs": [],
"source": [
Expand All @@ -94,8 +90,7 @@
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true,
"hidden": true
"editable": true
},
"source": [
"Below we can see each centroid marked w/ X, and the coloring associated to each respective cluster."
Expand All @@ -107,8 +102,7 @@
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true,
"hidden": true
"editable": true
},
"outputs": [],
"source": [
Expand All @@ -127,8 +121,7 @@
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"hidden": true
"editable": true
},
"outputs": [
{
Expand Down Expand Up @@ -840,7 +833,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -854,7 +847,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.6.2"
}
},
"nbformat": 4,
Expand Down
12 changes: 10 additions & 2 deletions deeplearning2/neural-sr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"editable": true,
"scrolled": true
},
"outputs": [
{
Expand All @@ -376,6 +377,13 @@
"its = len(arr_hr)//16; its"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"NOTE: Batch size must be a multiple of chunk length."
]
},
{
"cell_type": "code",
"execution_count": 34,
Expand Down Expand Up @@ -763,7 +771,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.6.2"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit afb6c4f

Please sign in to comment.