如果在使用 tensorflow 過程中出現 Error : Failed to get convolution algorithm ,這是因爲顯卡內存被耗盡了。
解決辦法:
在代碼的開頭加入如下兩句,動態分配顯存
physical_device = tf.config.experimental.list_physical_devices("GPU")
tf.config.experimental.set_memory_growth(physical_device[0], True)
如果在使用 tensorflow 過程中出現 Error : Failed to get convolution algorithm ,這是因爲顯卡內存被耗盡了。
解決辦法:
在代碼的開頭加入如下兩句,動態分配顯存
physical_device = tf.config.experimental.list_physical_devices("GPU")
tf.config.experimental.set_memory_growth(physical_device[0], True)