【tensorflow 使用錯誤】tensorflow2.0 過程中出現 Error : Failed to get convolution algorithm

如果在使用 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)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章