Enny1991 / PLSTM

137 stars 32 forks source link

remember states: in-place copy #5

Closed vivanov879 closed 7 years ago

vivanov879 commented 7 years ago

Currently you need to manually copy the states, but it is easier to create one initial_states variable that would hold the states and would be overwritten in place

here's output of the program run -- to make sure its working /usr/bin/python3.5 /home/vivanov/PycharmProjects/tensorflow_tutorial/simplePhasedLSTM.py

Compiling RNN... DONE! Compiling cost functions... DONE! /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/gradients_impl.py:91: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory. "Converting sparse IndexedSlices to a dense Tensor of unknown shape. " Calculating gradients... DONE! Initializing variables... DONE! +-----------+-----------+------------+ | Epoch=0 | Cost | Accuracy | +===========+===========+============+ | Train | 0.321394 | 0.853906 | +-----------+-----------+------------+ | Test | 0.0501576 | 1 | +-----------+-----------+------------+ +-----------+----------+------------+ | Epoch=1 | Cost | Accuracy | +===========+==========+============+ | Train | 0.134209 | 0.960156 | +-----------+----------+------------+ | Test | 0.162052 | 0.9375 | +-----------+----------+------------+ +-----------+-----------+------------+ | Epoch=2 | Cost | Accuracy | +===========+===========+============+ | Train | 0.108902 | 0.967578 | +-----------+-----------+------------+ | Test | 0.0796873 | 0.96875 | +-----------+-----------+------------+ +-----------+-----------+------------+ | Epoch=3 | Cost | Accuracy | +===========+===========+============+ | Train | 0.0943253 | 0.975781 | +-----------+-----------+------------+ | Test | 0.142393 | 0.96875 | +-----------+-----------+------------+

Enny1991 commented 7 years ago

Nice! Thanks!