codekansas/keras-language-modeling

internal values (question/answer representations) are always float64

guxd opened this issue · 4 comments

guxd commented

I augment the model to output representations of questions/answers. However, when I call predict to get the question vectors, I found the internal values of model(e.g., question_out, answer_out) are always with dtype='float64'.
I changed floatX='float32' in both theanorc.txt and ~/.keras/keras.json, and it doesn't work.
Is there anyway to set the output representations to 'float32'?

Hmm that is interesting. It ran on my GPU alright, which I assume means it was using float32. Maybe check to make sure the datatypes are always theano.config.floatX?

guxd commented

I checked the code and all dtypes are set to theano.config.floatX. Perhaps it is a bug of Keras..

Is theanorc.txt valid? I thought it was supposed to be specified in $HOME/.theanorc only

Probably a Theano or Keras issue