Skip to content

Machine Learning

[Python] 如何取代 Pandas DataFrame 中特定 column 內的值

在做資料處理的過程中,經常會有需要將特定 column 的值做替換的步驟。可能是處理 missing value、可能是將錯誤的數值刪除...... 當然,Python 有眾多的工具、套件、函式可以來進行常見的取代任務。不過,總難免會有需要特殊處理的情況。

Read More »[Python] 如何取代 Pandas DataFrame 中特定 column 內的值

[已解決] RuntimeError: CUDA error: device kernel image is invalid - CUDA kernel errors might be asynchronously reported at some other API call...

問題描述

最近我的某項工作就是把之前的舊專案使用 PyTorch Lightning 重構成新的訓練環節,並確保分數並沒有太大變化。其中,在我將某項二分類專案重構後,試跑出現了以下錯誤:

Read More »[已解決] RuntimeError: CUDA error: device kernel image is invalid - CUDA kernel errors might be asynchronously reported at some other API call...

[PyTorch] 保存優化器(optimizer)來接續訓練模型

我一直以來都希望能夠保存 PyTorch 訓練模型時所使用的優化器optimizer),以便能夠在模型結束訓練之後,繼續往下訓練;一般來說,如果是要做遷移學習、微調模型(fine-tune),那麼並不需要特別將上一次訓練的優化器保存下來。

Read More »[PyTorch] 保存優化器(optimizer)來接續訓練模型