{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# LSTM Text Generation\n", "\n", "*Based on: https://github.com/keras-team/keras/blob/master/examples/lstm_text_generation.py*\n", "\n", "This notebook explores the idea of generate text from Nietzsche's writings.\n", "\n", "At least 20 training epochs are required before the generated text\n", "starts sounding coherent.\n", "\n", "It is recommended to run this notebook on a GPU, as recurrent\n", "networks are quite computationally intensive.\n", "\n", "If you try this script on new data, make sure your corpus\n", "has at least ~100k characters. ~1M is better." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Using TensorFlow backend.\n", "ConX, version 3.7.5\n" ] } ], "source": [ "import conx as cx" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using cached https://s3.amazonaws.com/text-datasets/nietzsche.txt as './nietzsche.txt'.\n" ] } ], "source": [ "cx.download('https://s3.amazonaws.com/text-datasets/nietzsche.txt')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "text = open(\"nietzsche.txt\").read().lower()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "600893" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(text)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'preface\\n\\n\\nsupposing that truth is a woman--what then? is there not ground\\nfor suspecting that all ph'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "text[:100]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "total unique chars: 57\n" ] } ], "source": [ "chars = sorted(list(set(text)))\n", "print('total unique chars:', len(chars))" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'\\n !\"\\'(),-.0123456789:;=?[]_abcdefghijklmnopqrstuvwxyzäæéë'" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\"\".join(chars)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "char_indices = dict((c, i) for i, c in enumerate(chars))\n", "indices_char = dict((i, c) for i, c in enumerate(chars))" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "char to index: {'\\n': 0, ' ': 1, '!': 2, '\"': 3, \"'\": 4, '(': 5, ')': 6, ',': 7, '-': 8, '.': 9, '0': 10, '1': 11, '2': 12, '3': 13, '4': 14, '5': 15, '6': 16, '7': 17, '8': 18, '9': 19, ':': 20, ';': 21, '=': 22, '?': 23, '[': 24, ']': 25, '_': 26, 'a': 27, 'b': 28, 'c': 29, 'd': 30, 'e': 31, 'f': 32, 'g': 33, 'h': 34, 'i': 35, 'j': 36, 'k': 37, 'l': 38, 'm': 39, 'n': 40, 'o': 41, 'p': 42, 'q': 43, 'r': 44, 's': 45, 't': 46, 'u': 47, 'v': 48, 'w': 49, 'x': 50, 'y': 51, 'z': 52, 'ä': 53, 'æ': 54, 'é': 55, 'ë': 56}\n", "index to char: {0: '\\n', 1: ' ', 2: '!', 3: '\"', 4: \"'\", 5: '(', 6: ')', 7: ',', 8: '-', 9: '.', 10: '0', 11: '1', 12: '2', 13: '3', 14: '4', 15: '5', 16: '6', 17: '7', 18: '8', 19: '9', 20: ':', 21: ';', 22: '=', 23: '?', 24: '[', 25: ']', 26: '_', 27: 'a', 28: 'b', 29: 'c', 30: 'd', 31: 'e', 32: 'f', 33: 'g', 34: 'h', 35: 'i', 36: 'j', 37: 'k', 38: 'l', 39: 'm', 40: 'n', 41: 'o', 42: 'p', 43: 'q', 44: 'r', 45: 's', 46: 't', 47: 'u', 48: 'v', 49: 'w', 50: 'x', 51: 'y', 52: 'z', 53: 'ä', 54: 'æ', 55: 'é', 56: 'ë'}\n" ] } ], "source": [ "print(\"char to index:\", char_indices)\n", "print(\"index to char:\", indices_char)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Cut the text in semi-redundant sequences of maxlen characters:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "sequences: 200284\n" ] } ], "source": [ "maxlen = 40\n", "step = 3\n", "sequences = []\n", "for i in range(0, len(text) - maxlen - 1, step):\n", " sequences.append(text[i: i + maxlen + 1])\n", "print('sequences:', len(sequences))\n" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['preface\\n\\n\\nsupposing that truth is a woman',\n", " 'face\\n\\n\\nsupposing that truth is a woman--w',\n", " 'e\\n\\n\\nsupposing that truth is a woman--what',\n", " '\\nsupposing that truth is a woman--what th',\n", " 'pposing that truth is a woman--what then?',\n", " 'sing that truth is a woman--what then? is',\n", " 'g that truth is a woman--what then? is th',\n", " 'hat truth is a woman--what then? is there',\n", " ' truth is a woman--what then? is there no',\n", " 'uth is a woman--what then? is there not g']" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sequences[0:10]" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "41" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(sequences[0])" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(200284, 40, 57)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(len(sequences), maxlen, len(chars))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Vectorization" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[0, 0, 1, 0, 0]" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cx.onehot(2, 5)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "char_encode = {ch: cx.onehot(char_indices[ch], len(chars)) for ch in chars}" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n" ] } ], "source": [ "print(char_encode[\"a\"])" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "inputs = []\n", "targets = []\n", "for s in range(len(sequences)):\n", " current = [char_encode[ch] for ch in sequences[s]]\n", " inputs.append(current[:-1])\n", " targets.append(current[-1])" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(200284, 40, 57)" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cx.shape(inputs)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(200284, 57)" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cx.shape(targets)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [], "source": [ "net = cx.Network(\"LSTM Text Generation\")\n", "net.add(\n", " cx.Layer(\"input\", (maxlen, len(chars))),\n", " cx.LSTMLayer(\"lstm\", 128),\n", " cx.Layer(\"output\", len(chars), activation=\"softmax\"),\n", ")\n", "net.connect()\n", "net.compile(error=\"categorical_crossentropy\", optimizer=\"RMSProp\", lr=0.01)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "net.dataset.load(inputs=inputs, targets=targets)" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "_________________________________________________________________\n", "LSTM Text Generation Dataset:\n", "Patterns Shape Range \n", "=================================================================\n", "inputs (40, 57) (0.0, 1.0) \n", "targets (57,) (0.0, 1.0) \n", "=================================================================\n", "Total patterns: 200284\n", " Training patterns: 200284\n", " Testing patterns: 0\n", "_________________________________________________________________\n" ] } ], "source": [ "net.dataset.summary()" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5c5517b3f5744e38b2560f114313d613", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Dashboard(children=(Accordion(children=(HBox(children=(VBox(children=(Select(description='Dataset:', index=1, …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "net.dashboard()" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "net.dataset.chop(.99)" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "_________________________________________________________________\n", "LSTM Text Generation Dataset:\n", "Patterns Shape Range \n", "=================================================================\n", "inputs (40, 57) (0.0, 1.0) \n", "targets (57,) (0.0, 1.0) \n", "=================================================================\n", "Total patterns: 2003\n", " Training patterns: 2003\n", " Testing patterns: 0\n", "_________________________________________________________________\n" ] } ], "source": [ "net.dataset.summary()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[('ë', 0.02),\n", " (\"'\", 0.02),\n", " ('m', 0.02),\n", " ('e', 0.02),\n", " ('t', 0.02),\n", " ('j', 0.02),\n", " ('s', 0.02),\n", " ('0', 0.02),\n", " ('l', 0.02),\n", " ('4', 0.02),\n", " ('é', 0.02),\n", " ('i', 0.02),\n", " ('?', 0.02),\n", " ('w', 0.02),\n", " ('r', 0.02),\n", " ('æ', 0.02),\n", " ('5', 0.02),\n", " ('(', 0.02),\n", " ('6', 0.02),\n", " ('\"', 0.02),\n", " (';', 0.02),\n", " ('q', 0.02),\n", " ('-', 0.02),\n", " ('[', 0.02),\n", " ('3', 0.02),\n", " ('c', 0.02),\n", " ('p', 0.02),\n", " ('9', 0.02),\n", " (',', 0.02),\n", " ('_', 0.02),\n", " ('b', 0.02),\n", " ('y', 0.02),\n", " ('7', 0.02),\n", " (':', 0.02),\n", " ('ä', 0.02),\n", " ('.', 0.02),\n", " ('k', 0.02),\n", " ('2', 0.02),\n", " ('!', 0.02),\n", " ('x', 0.02),\n", " ('o', 0.02),\n", " ('n', 0.02),\n", " ('g', 0.02),\n", " ('f', 0.02),\n", " ('d', 0.02),\n", " (' ', 0.02),\n", " ('\\n', 0.02),\n", " ('8', 0.02),\n", " ('z', 0.02),\n", " (')', 0.02),\n", " ('u', 0.02),\n", " ('v', 0.02),\n", " (']', 0.02),\n", " ('a', 0.02),\n", " ('1', 0.02),\n", " ('=', 0.02),\n", " ('h', 0.02)]" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\"\".join([indices_char[cx.argmax(v)] for v in net.dataset.inputs[0]])\n", "probs = sorted(enumerate(net.propagate(net.dataset.inputs[0])), \n", " key=lambda v: v[1], reverse=True)\n", "[(indices_char[w[0]], round(w[1], 2)) for w in probs]" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "from IPython.display import clear_output" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [], "source": [ "def on_epoch_end(network, epoch=None, logs=None):\n", " import io\n", " epoch = epoch if epoch is not None else network.epoch_count\n", " s = io.StringIO()\n", " s.write(\"\\n\")\n", " s.write('----- Generating text after Epoch: %d\\n' % epoch)\n", " start_index = cx.choice(len(text) - maxlen - 1)\n", " for diversity in [0.2, 0.5, 1.0, 1.2]:\n", " sentence = text[start_index: start_index + maxlen]\n", " s.write('----- diversity: %s\\n' % diversity)\n", " s.write('----- Generating with seed: \"' + sentence + '\"\\n\\n')\n", " s.write(sentence)\n", " current = [char_encode[ch] for ch in sentence]\n", " for i in range(400):\n", " output = network.propagate(current)\n", " next_index = cx.choice(p=output, temperature=diversity, index=True)\n", " s.write(indices_char[next_index])\n", " next_char = char_encode[indices_char[next_index]]\n", " current = current[1:]\n", " current.append(next_char)\n", " s.write(\"\\n\")\n", " clear_output()\n", " print(s.getvalue())" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Training...\n", " | Training | Training \n", "Epochs | Error | Accuracy \n", "------ | --------- | --------- \n", "# 1 | 3.23989 | 0.15127 \n", "# 2 | 2.95753 | 0.18822 \n", "========================================================\n", "# 2 | 2.95753 | 0.18822 \n", "CPU times: user 3.86 s, sys: 613 ms, total: 4.47 s\n", "Wall time: 1.54 s\n" ] } ], "source": [ "%%time\n", "net.train(1, batch_size=128, plot=False)" ] }, { "cell_type": "code", "execution_count": 32, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Training...\n", " | Training | Training \n", "Epochs | Error | Accuracy \n", "------ | --------- | --------- \n", "# 2 | 2.95753 | 0.18822 \n", "# 3 | 2.81788 | 0.23665 \n", "========================================================\n", "# 3 | 2.81788 | 0.23665 \n", "CPU times: user 3.98 s, sys: 634 ms, total: 4.61 s\n", "Wall time: 1.6 s\n" ] } ], "source": [ "%%time\n", "net.train(1, batch_size=128, plot=False)" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'preface\\n\\n\\nsupposing that truth is a woma'" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\"\".join([indices_char[cx.argmax(v)] for v in net.dataset.inputs[0]])" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [], "source": [ "probs = sorted(enumerate(net.propagate(net.dataset.inputs[0])), \n", " key=lambda v: v[1], reverse=True)" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1, 0.1335555613040924)" ] }, "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "probs[0]" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[(' ', 0.13),\n", " ('s', 0.13),\n", " ('t', 0.12),\n", " ('n', 0.11),\n", " ('e', 0.1),\n", " ('l', 0.07),\n", " ('a', 0.06),\n", " ('i', 0.04),\n", " ('o', 0.03),\n", " ('g', 0.03),\n", " ('d', 0.02),\n", " ('r', 0.02),\n", " ('c', 0.02),\n", " ('m', 0.01),\n", " ('\\n', 0.01),\n", " ('b', 0.01),\n", " ('u', 0.01),\n", " ('p', 0.01),\n", " ('f', 0.01),\n", " ('y', 0.01),\n", " (',', 0.01),\n", " ('v', 0.01),\n", " ('k', 0.01),\n", " ('h', 0.0),\n", " ('w', 0.0),\n", " ('?', 0.0),\n", " ('-', 0.0),\n", " ('q', 0.0),\n", " ('.', 0.0),\n", " (':', 0.0),\n", " (';', 0.0),\n", " ('!', 0.0),\n", " ('\"', 0.0),\n", " ('x', 0.0),\n", " ('z', 0.0),\n", " ('1', 0.0),\n", " ('8', 0.0),\n", " ('j', 0.0),\n", " ('9', 0.0),\n", " ('6', 0.0),\n", " ('ä', 0.0),\n", " (')', 0.0),\n", " ('=', 0.0),\n", " (\"'\", 0.0),\n", " ('[', 0.0),\n", " ('(', 0.0),\n", " ('5', 0.0),\n", " ('é', 0.0),\n", " ('ë', 0.0),\n", " ('7', 0.0),\n", " ('4', 0.0),\n", " ('2', 0.0),\n", " (']', 0.0),\n", " ('_', 0.0),\n", " ('3', 0.0),\n", " ('æ', 0.0),\n", " ('0', 0.0)]" ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[(indices_char[w[0]], round(w[1], 2)) for w in probs]" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "----- Generating text after Epoch: 3\n", "----- diversity: 0.2\n", "----- Generating with seed: \", than the happily preserved petit\n", "fait \"\n", "\n", ", than the happily preserved petit\n", "fait te t o e s the t e e te the it e an as te an t e an the the te e s e an t an e e o e t e t e an at o e at t t e an e et an te t e ae an to e e te an at as at t e at an an at an e s e e te the an an the at an an te te the the te te e t t e an an e s at e t e e e e o at as e e an an an e e e o te t t e an as the as at o as the ae as te te t t t an the an e te t e as an at an e t an te t an an at\n", "----- diversity: 0.5\n", "----- Generating with seed: \", than the happily preserved petit\n", "fait \"\n", "\n", ", than the happily preserved petit\n", "fait iint an ane ta ecale s ane the to s an ete acas e e it the eet soe ian ie as thas shan t ie ool t e ale se e t b tae e an e t ie\n", "e in e so tot ee e s a e io o oe e te te t s as at s s as t ems g o at oo o s onie ie o aas ts to e te t e it the at ie as t ote it t t te se t oe e se s as te to le as to aio s te te t e at an abe as eie on it t og oe o t aiae ee ate sa e at ele ocoa n se a \n", "----- diversity: 1.0\n", "----- Generating with seed: \", than the happily preserved petit\n", "fait \"\n", "\n", ", than the happily preserved petit\n", "fait ?snwigeika eine wec v bso nay w soe an se -nm o d s tht enl adrsse t t oceangrme b vt \"twtio. wtoom t elonm dpd lhiato he egt, ooraeiabe ot tteetepy it thtey a en ra t asu is ce w getr eonoi eed tk l?\n", "ao d nt aae a angsn n o, b\n", " asenteenertisio,,eiée goseqbiae imy s eo h\n", "aceuato yteyemieni, eoaeea\n", "siag nk anrbalre alasintot, ler o! \n", "oed annd suo. ritaastsilteef o g nus\n", "c st le aouueere s d\n", "----- diversity: 1.2\n", "----- Generating with seed: \", than the happily preserved petit\n", "fait \"\n", "\n", ", than the happily preserved petit\n", "fait metyebte s efoalliitul, an e , e, t\n", "smesol, s sctoovifaal igsuaew oy\n", "s uk eris ta hc en- saeue i\"upilee ss hes r e\n", "he :seed iey s decenic opeemot\n", ", nauphln: wsa\n", "k loekcosahf o doinoa1l, ,omesroqidgdo s qtoos n nn ltnetgaa:os ssclodidy anuterngoxieoseans teoyregeonseny\n", "att usle wepms se shiaaieffeaaeyis,ratrepsefitit8ox por rei-gn dwo l e oa slbn:o\n", "rr nbos mede\n", "is ysbl c e oel r mry rpuitkiiaa ss\n", "\n" ] } ], "source": [ "on_epoch_end(net)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "0329d20bbea54b088ef55a84ef8c9429": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "095b46cc361247509b33328986ce5886": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "0bf2a7b021ef44af8ca65c52a31d42ff": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "SelectModel", "state": { "_options_labels": [ "", "Accent", "Accent_r", "Blues", "Blues_r", "BrBG", "BrBG_r", "BuGn", "BuGn_r", "BuPu", "BuPu_r", "CMRmap", "CMRmap_r", "Dark2", "Dark2_r", "GnBu", "GnBu_r", "Greens", "Greens_r", "Greys", "Greys_r", "OrRd", "OrRd_r", "Oranges", "Oranges_r", "PRGn", "PRGn_r", "Paired", "Paired_r", "Pastel1", "Pastel1_r", "Pastel2", "Pastel2_r", "PiYG", "PiYG_r", "PuBu", "PuBuGn", "PuBuGn_r", "PuBu_r", "PuOr", "PuOr_r", "PuRd", "PuRd_r", "Purples", "Purples_r", "RdBu", "RdBu_r", "RdGy", "RdGy_r", "RdPu", "RdPu_r", "RdYlBu", "RdYlBu_r", "RdYlGn", "RdYlGn_r", "Reds", "Reds_r", "Set1", "Set1_r", "Set2", "Set2_r", "Set3", "Set3_r", "Spectral", "Spectral_r", "Wistia", "Wistia_r", "YlGn", "YlGnBu", "YlGnBu_r", "YlGn_r", "YlOrBr", "YlOrBr_r", "YlOrRd", "YlOrRd_r", "afmhot", "afmhot_r", "autumn", "autumn_r", "binary", "binary_r", "bone", "bone_r", "brg", "brg_r", "bwr", "bwr_r", "cividis", "cividis_r", "cool", "cool_r", "coolwarm", "coolwarm_r", "copper", "copper_r", "cubehelix", "cubehelix_r", "flag", "flag_r", "gist_earth", "gist_earth_r", "gist_gray", "gist_gray_r", "gist_heat", "gist_heat_r", "gist_ncar", "gist_ncar_r", "gist_rainbow", "gist_rainbow_r", "gist_stern", "gist_stern_r", "gist_yarg", "gist_yarg_r", "gnuplot", "gnuplot2", "gnuplot2_r", "gnuplot_r", "gray", "gray_r", "hot", "hot_r", "hsv", "hsv_r", "inferno", "inferno_r", "jet", "jet_r", "magma", "magma_r", "nipy_spectral", "nipy_spectral_r", "ocean", "ocean_r", "pink", "pink_r", "plasma", "plasma_r", "prism", "prism_r", "rainbow", "rainbow_r", "seismic", "seismic_r", "spring", "spring_r", "summer", "summer_r", "tab10", "tab10_r", "tab20", "tab20_r", "tab20b", "tab20b_r", "tab20c", "tab20c_r", "terrain", "terrain_r", "viridis", "viridis_r", "winter", "winter_r" ], "description": "Colormap:", "index": 0, "layout": "IPY_MODEL_0329d20bbea54b088ef55a84ef8c9429", "rows": 1, "style": "IPY_MODEL_2af6094a6f954f088c5bf398c1149ad2" } }, "0c93a0f4c30744b1b472e5241ff0253a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "Rotate network", "disabled": false, "layout": "IPY_MODEL_d057760467374d068d2d566ef4781a51", "style": "IPY_MODEL_d355e2bd3df2463387acc0c1b7ce103c", "value": true } }, "0d37fb3ca8d744288dfa21652012b8c1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_f89e0eed297c432dab83dc884da42811", "IPY_MODEL_a05b0fd124a14f348981e45b15d555d4" ], "layout": "IPY_MODEL_1dbb29ac75e04746a0bdc543f2cc9224" } }, "15a1d44bed814ebc81be23104cc7feec": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "15a8d4379ed440dfa2d17cd68c25e2c7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonModel", "state": { "icon": "backward", "layout": "IPY_MODEL_c00b8ad52ae4455883d1c0dd593523b0", "style": "IPY_MODEL_d610bf1dd689405793165f3283971d89" } }, "15aa7c6c97924705a701414b823617df": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "SliderStyleModel", "state": { "description_width": "" } }, "16f7888185164b13a43bcd1fb6ad1074": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "18552ce1a0594353bb1855ce610768e8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_b46eaccca19a4615b5c85c559d7f2eed", "IPY_MODEL_3407eec1fec94bbaa0e3b8cfd3833ba7" ], "layout": "IPY_MODEL_5dde9f5da9cb41efbabc45c67328c4d5" } }, "1dbb29ac75e04746a0bdc543f2cc9224": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "1f1f5c0d8abf444fad29ba6e595791cb": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "HTMLModel", "state": { "layout": "IPY_MODEL_7163f0bfb9c647a3a4ee1a402d8aeadf", "style": "IPY_MODEL_e1ffe63992684f969c58ee51c4f9caa6", "value": "" } }, "24f2c5bbaaec4eabacbc765c11a73834": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "FloatTextModel", "state": { "description": "Leftmost color maps to:", "layout": "IPY_MODEL_89c561b9052441a381df978a7d2575cd", "step": null, "style": "IPY_MODEL_5bbbce288e604196b4b974f4645f353d" } }, "2968d81dd5cb4794aeda23f1b6e17e66": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_c3472ce0e1dc4a03a4576031bfba3bba" } }, "29e8a7e75e424f739da1eeaaa924a043": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "IntTextModel", "state": { "description": "Vertical space between layers:", "layout": "IPY_MODEL_0329d20bbea54b088ef55a84ef8c9429", "step": 1, "style": "IPY_MODEL_563f918b6d064ea8a207dc678e5eb484", "value": 30 } }, "2a5b9e994baf49cb9eae61cf040fc200": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "2af6094a6f954f088c5bf398c1149ad2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "2d75a7be8c944c3d9ede621a6957e259": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "319235652a854310b0cf9551eb68e9cc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonModel", "state": { "icon": "refresh", "layout": "IPY_MODEL_e3020b71aaee45a787b8a3112cb8d402", "style": "IPY_MODEL_baa1c1e382fc4c59a4dbc51360e77dcd" } }, "32870b49929840ef8c65e8f3c002531e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "32998736a8e4405baf00efd9bd5823a4": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "333b8eb4630a4109b9de94b2abd3a388": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "AccordionModel", "state": { "_titles": { "0": "LSTM Text Generation" }, "children": [ "IPY_MODEL_53642318602f4988903d114c15f71830" ], "layout": "IPY_MODEL_e320e66d87e04dc98062a3836601e417", "selected_index": null } }, "3407eec1fec94bbaa0e3b8cfd3833ba7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "LabelModel", "state": { "layout": "IPY_MODEL_eaaba0975e174deb8391cd0fcd8d749f", "style": "IPY_MODEL_5056519f5b354205879a5cf3b5655ea8", "value": "of 200284" } }, "34bd3c2ca008457b88bc3f6bd07fbdf4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonModel", "state": { "icon": "fast-forward", "layout": "IPY_MODEL_4af78e71a0a043fba05a2a23d8bdac4c", "style": "IPY_MODEL_df41657d9ddc44d18024de9b15c6c337" } }, "351f0a7fbaed45f9b1f949fdb648bfe0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonModel", "state": { "description": "Play", "icon": "play", "layout": "IPY_MODEL_2a5b9e994baf49cb9eae61cf040fc200", "style": "IPY_MODEL_8342285673a14ca5aa486851e8935c19" } }, "3c34b2b759ee41e6adf587eab4473669": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "3d49061b51e04c339b4ae93513ae5e8c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "3d65febbb99842ce9bb77c3baa1a047c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "Rotate", "disabled": false, "layout": "IPY_MODEL_0329d20bbea54b088ef55a84ef8c9429", "style": "IPY_MODEL_15a1d44bed814ebc81be23104cc7feec", "value": true } }, "3da3ca5ba89b440c879e7ab01b3ae3b7": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "4365f6b09cde4a20a974ef2cee2e66b7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "437c40de6f804e0788bee18b6eb762ea": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "45e7bc40b2cd44fc8b4b00beba2f1026": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "height": "50px", "width": "100%" } }, "4af78e71a0a043fba05a2a23d8bdac4c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "5056519f5b354205879a5cf3b5655ea8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "53642318602f4988903d114c15f71830": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_d422836279894b9a9d575a2c55c9cd0f", "IPY_MODEL_5e1b176489e747db8ffb2b79d6c9c939" ], "layout": "IPY_MODEL_8951bde90e12497792d94ff7ecaffbd7" } }, "55031290657848b7b64e735f50d54efd": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "563f918b6d064ea8a207dc678e5eb484": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "57a2eae134124ec9b7f400dccb469314": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "SelectModel", "state": { "_options_labels": [ "" ], "description": "Features:", "index": 0, "layout": "IPY_MODEL_bfdbaab9247b424e9dc195db56c4feeb", "rows": 1, "style": "IPY_MODEL_58179d60bccc4a3c811e7f85031f13ac" } }, "58179d60bccc4a3c811e7f85031f13ac": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "5bbbce288e604196b4b974f4645f353d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "5c5517b3f5744e38b2560f114313d613": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_333b8eb4630a4109b9de94b2abd3a388", "IPY_MODEL_88db1cd19d394659af961a79f0d75e46", "IPY_MODEL_e40cb2102e464411960245612fe36bee", "IPY_MODEL_2968d81dd5cb4794aeda23f1b6e17e66" ], "layout": "IPY_MODEL_ce39c981a73c4fba90333ebf3dab000c" } }, "5dde9f5da9cb41efbabc45c67328c4d5": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "height": "40px" } }, "5e1b176489e747db8ffb2b79d6c9c939": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_c2f95da484f34db2893accf0f3f26452", "IPY_MODEL_9e903b44ec70421da8c90eb75d14c172", "IPY_MODEL_0bf2a7b021ef44af8ca65c52a31d42ff", "IPY_MODEL_1f1f5c0d8abf444fad29ba6e595791cb", "IPY_MODEL_24f2c5bbaaec4eabacbc765c11a73834", "IPY_MODEL_97d6fd8e7de247a0b282d6751a3a1abe", "IPY_MODEL_bc2b8244bfcd4948a49827949609c135", "IPY_MODEL_e7793c957abf4bcdb8e6530f2f52fc1b" ], "layout": "IPY_MODEL_d3f52aa9c9b7475cb7231ccf164ebbfe" } }, "647057fc1c634ea5a92d61f5e6912bab": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonModel", "state": { "icon": "forward", "layout": "IPY_MODEL_32998736a8e4405baf00efd9bd5823a4", "style": "IPY_MODEL_922c026509bb4526908aa855c6759edc" } }, "673dcc13468b4338b70a87f84dfdcc91": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "justify_content": "center", "overflow_x": "auto", "overflow_y": "auto", "width": "95%" } }, "675623461d204fcca09e115399aa487a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "6973dee4c06a4ac7aa38c292868dd0b6": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "6bee6e7c0a7f49808d22351d3d694bee": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "SelectModel", "state": { "_options_labels": [ "Test", "Train" ], "description": "Dataset:", "index": 1, "layout": "IPY_MODEL_437c40de6f804e0788bee18b6eb762ea", "rows": 1, "style": "IPY_MODEL_4365f6b09cde4a20a974ef2cee2e66b7" } }, "6d2500fa98004c87ac2ea518f2d24756": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "IntTextModel", "state": { "layout": "IPY_MODEL_55031290657848b7b64e735f50d54efd", "step": 1, "style": "IPY_MODEL_bfa6161ff4ff40ae8fe78b28f2685179" } }, "7163f0bfb9c647a3a4ee1a402d8aeadf": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "71d0aed1b5034829b0778bf24894a2e2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonStyleModel", "state": {} }, "7762292d4ab446ea9bfca91761c7b2ac": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "7e017d71cbd340d191598d360f73639b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "7fb13d3063af4dafaaf24b495f1fa9f4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonModel", "state": { "icon": "fast-backward", "layout": "IPY_MODEL_a14d7092680b4237a43a62e8cae7742a", "style": "IPY_MODEL_85f0b775184540dda085bed8c318af6b" } }, "8342285673a14ca5aa486851e8935c19": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonStyleModel", "state": {} }, "85f0b775184540dda085bed8c318af6b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonStyleModel", "state": {} }, "88db1cd19d394659af961a79f0d75e46": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_18552ce1a0594353bb1855ce610768e8", "IPY_MODEL_941cf404eaf340d890880811eda7f077" ], "layout": "IPY_MODEL_675623461d204fcca09e115399aa487a" } }, "8951bde90e12497792d94ff7ecaffbd7": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "89c561b9052441a381df978a7d2575cd": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "8b8d5b22b38245cb8ab4aeda82c970d9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "IntTextModel", "state": { "description": "Feature columns:", "layout": "IPY_MODEL_b5100d0c2d444450ba574ebc3a14ac02", "step": 1, "style": "IPY_MODEL_d4efbda118c7470791e4c6c51df6736c", "value": 3 } }, "8c0c8473a44b48ef94e99dd69c96e02d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "FloatTextModel", "state": { "description": "Feature scale:", "layout": "IPY_MODEL_7e017d71cbd340d191598d360f73639b", "step": null, "style": "IPY_MODEL_095b46cc361247509b33328986ce5886", "value": 1 } }, "922c026509bb4526908aa855c6759edc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonStyleModel", "state": {} }, "941cf404eaf340d890880811eda7f077": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_7fb13d3063af4dafaaf24b495f1fa9f4", "IPY_MODEL_15a8d4379ed440dfa2d17cd68c25e2c7", "IPY_MODEL_6d2500fa98004c87ac2ea518f2d24756", "IPY_MODEL_647057fc1c634ea5a92d61f5e6912bab", "IPY_MODEL_34bd3c2ca008457b88bc3f6bd07fbdf4", "IPY_MODEL_351f0a7fbaed45f9b1f949fdb648bfe0", "IPY_MODEL_319235652a854310b0cf9551eb68e9cc" ], "layout": "IPY_MODEL_45e7bc40b2cd44fc8b4b00beba2f1026" } }, "97d6fd8e7de247a0b282d6751a3a1abe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "FloatTextModel", "state": { "description": "Rightmost color maps to:", "layout": "IPY_MODEL_cc1eba9dedd44205aa577b28a2431a46", "step": null, "style": "IPY_MODEL_a3c30e1f41424f7d98121170297acefa", "value": 1 } }, "9e903b44ec70421da8c90eb75d14c172": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "Visible", "disabled": false, "layout": "IPY_MODEL_0329d20bbea54b088ef55a84ef8c9429", "style": "IPY_MODEL_df5069bdd7be47bfa2770b73fe9fa37c", "value": true } }, "a05b0fd124a14f348981e45b15d555d4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "Errors", "disabled": false, "layout": "IPY_MODEL_0329d20bbea54b088ef55a84ef8c9429", "style": "IPY_MODEL_af937e520e3f48ff9fd3cb281f976772", "value": false } }, "a14d7092680b4237a43a62e8cae7742a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "a3c30e1f41424f7d98121170297acefa": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "ab5a021a76d24003acc01c421baa08ba": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "SliderStyleModel", "state": { "description_width": "initial" } }, "af937e520e3f48ff9fd3cb281f976772": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "b46eaccca19a4615b5c85c559d7f2eed": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "IntSliderModel", "state": { "continuous_update": false, "description": "Dataset index", "layout": "IPY_MODEL_3d49061b51e04c339b4ae93513ae5e8c", "max": 200283, "style": "IPY_MODEL_15aa7c6c97924705a701414b823617df" } }, "b5100d0c2d444450ba574ebc3a14ac02": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "b56baff56a47493196ae892f9a0c8248": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "baa1c1e382fc4c59a4dbc51360e77dcd": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonStyleModel", "state": {} }, "bc2b8244bfcd4948a49827949609c135": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "IntTextModel", "state": { "description": "Feature to show:", "layout": "IPY_MODEL_6973dee4c06a4ac7aa38c292868dd0b6", "step": 1, "style": "IPY_MODEL_b56baff56a47493196ae892f9a0c8248" } }, "bca1def9885a4c0cb8ff5a0f3637c649": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "bfa6161ff4ff40ae8fe78b28f2685179": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "bfdbaab9247b424e9dc195db56c4feeb": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "c00b8ad52ae4455883d1c0dd593523b0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "c2f95da484f34db2893accf0f3f26452": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "SelectModel", "state": { "_options_labels": [ "input", "lstm", "output" ], "description": "Layer:", "index": 2, "layout": "IPY_MODEL_3da3ca5ba89b440c879e7ab01b3ae3b7", "rows": 1, "style": "IPY_MODEL_7762292d4ab446ea9bfca91761c7b2ac" } }, "c3472ce0e1dc4a03a4576031bfba3bba": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "c5145428f04e4144b8218fef012c06a8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonModel", "state": { "icon": "save", "layout": "IPY_MODEL_d86272167c434c0c820ce3bb28eca464", "style": "IPY_MODEL_71d0aed1b5034829b0778bf24894a2e2" } }, "cab688206d594b9a8e3d26cf4be55d8c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "65%" } }, "cc1eba9dedd44205aa577b28a2431a46": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "ce39c981a73c4fba90333ebf3dab000c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "d057760467374d068d2d566ef4781a51": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "52%" } }, "d355e2bd3df2463387acc0c1b7ce103c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "d3f52aa9c9b7475cb7231ccf164ebbfe": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "d422836279894b9a9d575a2c55c9cd0f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_6bee6e7c0a7f49808d22351d3d694bee", "IPY_MODEL_e1d6a905b43c4ff98efaf0011f9182e3", "IPY_MODEL_fe1052f3f02f4f34a5b98ce0f9c8d280", "IPY_MODEL_29e8a7e75e424f739da1eeaaa924a043", "IPY_MODEL_0d37fb3ca8d744288dfa21652012b8c1", "IPY_MODEL_57a2eae134124ec9b7f400dccb469314", "IPY_MODEL_8b8d5b22b38245cb8ab4aeda82c970d9", "IPY_MODEL_8c0c8473a44b48ef94e99dd69c96e02d" ], "layout": "IPY_MODEL_16f7888185164b13a43bcd1fb6ad1074" } }, "d4efbda118c7470791e4c6c51df6736c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "d610bf1dd689405793165f3283971d89": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonStyleModel", "state": {} }, "d86272167c434c0c820ce3bb28eca464": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "10%" } }, "df41657d9ddc44d18024de9b15c6c337": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ButtonStyleModel", "state": {} }, "df5069bdd7be47bfa2770b73fe9fa37c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "e1d6a905b43c4ff98efaf0011f9182e3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "FloatSliderModel", "state": { "continuous_update": false, "description": "Zoom", "layout": "IPY_MODEL_cab688206d594b9a8e3d26cf4be55d8c", "max": 1, "step": 0.1, "style": "IPY_MODEL_ab5a021a76d24003acc01c421baa08ba", "value": 0.5 } }, "e1ffe63992684f969c58ee51c4f9caa6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "e3020b71aaee45a787b8a3112cb8d402": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "25%" } }, "e320e66d87e04dc98062a3836601e417": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "e40cb2102e464411960245612fe36bee": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "HTMLModel", "state": { "layout": "IPY_MODEL_673dcc13468b4338b70a87f84dfdcc91", "style": "IPY_MODEL_2d75a7be8c944c3d9ede621a6957e259", "value": "

\n \n \n \n \n \n \n Layer: output (output)\n output range: (0, 1)\n shape = (57,)\n Keras class = Dense\n activation = softmaxtargetsLayer: output (output)\n output range: (0, 1)\n shape = (57,)\n Keras class = Dense\n activation = softmaxoutputLayer: lstm (hidden)\n output range: (-Infinity, +Infinity)\n Keras class = LSTMlstmLayer: input (input)\n output range: (0.0, 1.0)\n shape = (40, 57)\n Keras class = InputinputLSTM Text Generation

" } }, "e7793c957abf4bcdb8e6530f2f52fc1b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_0c93a0f4c30744b1b472e5241ff0253a", "IPY_MODEL_c5145428f04e4144b8218fef012c06a8" ], "layout": "IPY_MODEL_bca1def9885a4c0cb8ff5a0f3637c649" } }, "eaaba0975e174deb8391cd0fcd8d749f": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": { "width": "100px" } }, "f89e0eed297c432dab83dc884da42811": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "Show Targets", "disabled": false, "layout": "IPY_MODEL_0329d20bbea54b088ef55a84ef8c9429", "style": "IPY_MODEL_32870b49929840ef8c65e8f3c002531e", "value": true } }, "fe1052f3f02f4f34a5b98ce0f9c8d280": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "IntTextModel", "state": { "description": "Horizontal space between banks:", "layout": "IPY_MODEL_0329d20bbea54b088ef55a84ef8c9429", "step": 1, "style": "IPY_MODEL_3c34b2b759ee41e6adf587eab4473669", "value": 150 } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 2 }