This commit is contained in:
Aditya Kusupati 2019-05-05 18:36:47 +05:30
Родитель c61de1bc6f
Коммит 59eb12adc2
1 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -31,6 +31,9 @@
"from edgeml.trainer.fastTrainer import FastTrainer\n",
"from edgeml.graph.rnn import FastGRNNCell\n",
"from edgeml.graph.rnn import FastRNNCell\n",
"from edgeml.graph.rnn import UGRNNLRCell\n",
"from edgeml.graph.rnn import GRULRCell\n",
"from edgeml.graph.rnn import LSTMLRCell\n",
"\n",
"# Fixing seeds for reproducibility\n",
"tf.set_random_seed(42)\n",
@ -86,7 +89,7 @@
"metadata": {},
"outputs": [],
"source": [
"cell = \"FastGRNN\" # Choose between FastGRNn & FastRNN\n",
"cell = \"FastGRNN\" # Choose between FastGRNN, FastRNN, UGRNN, GRU and LSTM\n",
"\n",
"inputDims = 16 #features taken in by RNN in one timestep\n",
"hiddenDims = 32 #hidden state of RNN\n",
@ -174,6 +177,15 @@
"elif cell == \"FastRNN\":\n",
" FastCell = FastRNNCell(hiddenDims, update_non_linearity=update_non_linearity,\n",
" wRank=wRank, uRank=uRank)\n",
"elif cell == \"UGRNN\":\n",
" FastCell = UGRNNLRCell(hiddenDims, update_non_linearity=update_non_linearity,\n",
" wRank=wRank, uRank=uRank)\n",
"elif cell == \"GRU\":\n",
" FastCell = GRULRCell(hiddenDims, update_non_linearity=update_non_linearity,\n",
" wRank=wRank, uRank=uRank)\n",
"elif cell == \"LSTM\":\n",
" FastCell = LSTMLRCell(hiddenDims, update_non_linearity=update_non_linearity,\n",
" wRank=wRank, uRank=uRank)\n",
"else:\n",
" sys.exit('Exiting: No Such Cell as ' + cell)"
]
@ -1537,7 +1549,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.5.5"
}
},
"nbformat": 4,