Skip to content

Machine Learning

[已解決] HuggingFace Transformers 模型返回 “‘ValueError: too many values to unpack (expected 2)’, upon training a Bert binary classification model”

在現今深度學習的框架中,無論是使用 Tensorflow、PyTorch 還是其他框架,模型的輸入輸出、資料流向…… 等等,我們都需要十分注意其資料的形狀(shape)。因為一不小心,就會讓模型架構回傳錯誤訊息。

Read More »[已解決] HuggingFace Transformers 模型返回 “‘ValueError: too many values to unpack (expected 2)’, upon training a Bert binary classification model”

[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…