What is data type for Python Keras deep learning package?

情到浓时终转凉″ 提交于 2019-12-03 03:41:28

Keras uses numpy arrays containing the theano.config.floatX floating point type. This can be configured in your .theanorc file.

Typically, it will be float64 for CPU computations and float32 for GPU computations, although you can also set it to float32 when working on the CPU if you prefer.

You can create a zero-filled array of the proper type by the command

X = numpy.zeros((4,3), dtype=theano.config.floatX)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!