returnn
returnn copied to clipboard
MDLSTM in TensorFlow backend
I want to use tensorflow as the backend in training the models. How do I switch from Theano to Tensorflow?
Basically, you just need to put use_tensorflow = True
in your config.
Note that not all layers are implemented currently in the TF backend. So far, the linear/forward layer and the rec layer with LSTM should work. Other layers are limited and also might have slightly different options, e.g. the conv layer. Maybe post your config here so I can have a quick look.
I'm using the config_real in the MDLSTM demo for IAM
So that config file I guess. Most of the layers are not yet available in TF, i.e. there is no 1Dto2D, conv2, mdlstm. 1Dto2D and conv2 should be easy to replace with the existing TF layers, I think (or it would not require much work otherwise). mdlstm is not so simple to adapt to TF and would require some work. This is planned but no-one currently works on it.
It's a pity that this functionality is not available yet, it would be very interesting having MDLSTM supported by TF. I look forward to this new feature.
I want to use tensorflow backend, but i only see config for 'train' . how to build config file, eval data for 'forward'?
@lannp Where are you looking at? Here are configs for training (config_real
) as well as forwarding (config_fwd
). Anyway, TensorFlow is not supported at all right now for MDLSTM. Feel free to contribute!
This is not about any or the official pure TF implementation. This is about our own CUDA kernel, which should be much faster.