今天在把之前NMT代码迁到tf2.0 stable 上遇到了一个"CUDNN_STATUS_INTERNAL_ERROR"的问题,简单记录一下。
是一个跟gpu显存有关的问题,指定gpu动态分配便可。python
Tensorflow2.0中gpuconfig相关的搬到了tf.config.experimental下
documentgit
physical_devices = tf.config.experimental.list_physical_devices('GPU') assert len(physical_devices) > 0, "Not enough GPU hardware devices available" tf.config.experimental.set_memory_growth(physical_devices[0], True)
放在网络initialize前便可github