Closed GRuuuuu closed 5 years ago
The version of TFLMS in PowerAI 1.5.3 and 1.5.4 is very similar to the implementation in this repository. As shown in #9 this version of TFLMS cannot handle loops in the graph, including the loops created by RNNs and LSTMs.
However, IBM PowerAI 1.6.0 and IBM Watson Machine Learning Community Edition 1.6.1 have a new implementation of TensorFlow Large Model Support and in Watson Machine Learning Community Edition 1.6.1 it was updated to tolerate loops: https://www.ibm.com/support/knowledgecenter/SS5SF7_1.6.1/navigation/wmlce_getstarted_tflmsv2.html "While loops TFLMS does not swap tensors for operations inside while loops. TensorFlow while loops have built in GPU-CPU memory swapping that can be enabled. If the model is using while loops it is recommended to set swap_memory=True on the while loop. See the TensorFlow documentation for more information."
In TensorFlow (and the TensorFlow backend to Keras), there is built in swapping for tensors in LSTMs and RNNs - even without TensorFlow Large Model Support.
I wrote an article about the performance characteristics of that here: https://developer.ibm.com/linuxonpower/2019/07/09/tensor-swapping-with-recurrent-neural-networks-in-tensorflow/
In your particular case I would suggest investigating that support or upgrading to IBM Watson Machine Learning 1.6.1 if you wish to use TFLMS with LSTMs.
Hi, I tried to applying LMS to simple LSTM(keras). I followed same as LMS doc.
The original keras code : https://github.com/keras-team/keras/blob/master/examples/imdb_bidirectional_lstm.py
Here is code that adding LMS :
and I have same error as #9
I also read #9, but I don't know how I solve this problem. Is it(that code) wrong? Or does LSTM not apply to LMS?
Thanks.