|
1
6
注:我使用的是Keras 2.2.4和TensorFlow 1.12.0。 1) 使用CudnnLSTM训练模型,并保存模型(model\ GPU.json)和权重(*.h5)。
2*)在LSTM细胞组中激活=“tanh”,反复激活=“sigmoid”。因为这些是CudnnLSTM中的默认值。 3) 然后您可以使用CudnnLSTM训练的权重加载model_CPU.json。 具体来说,我使用了以下方法 中央处理器:
GPU:
|