Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Keras模型训练时间过长_Python_Performance_Tensorflow_Keras_Lstm - Fatal编程技术网

Python Keras模型训练时间过长

Python Keras模型训练时间过长,python,performance,tensorflow,keras,lstm,Python,Performance,Tensorflow,Keras,Lstm,因此,我有以下情绪分析模型(使用预先训练好的单词嵌入): 可见,我有一个预先训练过的嵌入矩阵,只有大约500k的可训练参数。那么为什么训练这个模型要花上一辈子的时间呢?批量大小为128,纪元数为25。第一个纪元的预计到达时间约为10分钟。我还没完成呢 我要说的是,我没有使用CUDA或任何东西。我想我没有GPU支持的Tensorflow。我愿意做任何事情来提高速度。我有Tensorflow 2.1.0。下面是答案我没有使用CUDA或任何东西。在CPU上的训练要比在GPU上慢得多。如果您没有足够高

因此,我有以下情绪分析模型(使用预先训练好的单词嵌入):

可见,我有一个预先训练过的嵌入矩阵,只有大约500k的可训练参数。那么为什么训练这个模型要花上一辈子的时间呢?批量大小为128,纪元数为25。第一个纪元的预计到达时间约为10分钟。我还没完成呢


我要说的是,我没有使用CUDA或任何东西。我想我没有GPU支持的Tensorflow。我愿意做任何事情来提高速度。我有Tensorflow 2.1.0。

下面是答案
我没有使用CUDA或任何东西。在CPU上的训练要比在GPU上慢得多。如果您没有足够高性能的视频卡,您可以使用多种服务,如Google Colab或Kaggle

我有RTX 2070。这会有帮助吗?嗯,这绝对是一张高性能的卡。要在tensorflow中启用GPU支持,请使用此选项,可以说的不多,您没有包括任何重要的细节。“整个永恒”有多少时间?你用哪个CPU来训练这个?