Skip to content

Commit

Permalink
fixing attention viz notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
MostafaDehghani committed Jun 25, 2018
1 parent f8e1cfe commit 66c5997
Show file tree
Hide file tree
Showing 4 changed files with 525 additions and 169 deletions.
2 changes: 1 addition & 1 deletion babi_attention.js
Expand Up @@ -8,7 +8,7 @@ function($, d3) {
var attention = window.attention;

const TEXT_SIZE = 15;
const BOXWIDTH = TEXT_SIZE * 30;
const BOXWIDTH = TEXT_SIZE * 20;
const BOXHEIGHT = TEXT_SIZE * 1.5;
const WIDTH = 2000;
const HEIGHT = attention.inp_inp.bot_text.length * BOXHEIGHT * 2 + 100;
Expand Down
39 changes: 12 additions & 27 deletions babi_visualization_UT_act_pondertime.ipynb
Expand Up @@ -15,14 +15,11 @@
},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'tensorflow'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-1-fbdc709d15a9>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mtensorflow\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mtf\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'tensorflow'"
"name": "stderr",
"output_type": "stream",
"text": [
"/home/mdehgha1/bin/anaconda3/envs/tf/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n"
]
}
],
Expand Down Expand Up @@ -198,6 +195,7 @@
}
},
"colab_type": "code",
"collapsed": true,
"id": "lmzvmnqY6Byq"
},
"outputs": [],
Expand Down Expand Up @@ -399,6 +397,7 @@
}
},
"colab_type": "code",
"collapsed": true,
"id": "X9fnUy-e7sSx"
},
"outputs": [],
Expand All @@ -417,6 +416,7 @@
}
},
"colab_type": "code",
"collapsed": true,
"id": "Zv8YmyJubAKD"
},
"outputs": [],
Expand All @@ -440,6 +440,7 @@
}
},
"colab_type": "code",
"collapsed": true,
"id": "nT7GG8tmbAKH"
},
"outputs": [],
Expand Down Expand Up @@ -636,22 +637,6 @@
" f_size = (25,5)\n",
"df.plot(kind='bar', x='input', y='ponder_time', rot=90, width=0.3, figsize=f_size, cmap='Spectral')"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "6CC2t72dqMYf"
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -677,9 +662,9 @@
"views": {}
},
"kernelspec": {
"display_name": "tensorflow",
"display_name": "Python [default]",
"language": "python",
"name": "tensorflow"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -691,7 +676,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.6.2"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 66c5997

Please sign in to comment.