Skip to content

Python

[已解決] 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 內的值