Python Keras深度学习包的数据类型是什么? [英] What is data type for Python Keras deep learning package?
问题描述
我没有找到需要使用此链接的Python Keras deep learning package
数据类型的任何信息.我检查了数组和列表,但返回了错误.有任何线索吗?
Keras使用包含theano.config.floatX
浮点类型的numpy
数组.可以在您的 .theanorc
文件中进行配置.>
通常,对于CPU计算,它将为float64
;对于GPU计算,它将为float32
,尽管您也可以根据需要在使用CPU时将其设置为float32
.
您可以通过命令创建正确类型的零填充数组
X = numpy.zeros((4,3), dtype=theano.config.floatX)
I didn't find anything about data type that we need to work with Python Keras deep learning package
with this link. I checked array and list but returned error. Any clue?
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)
这篇关于Python Keras深度学习包的数据类型是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!