From a0adf0d5d39794c3993e25ea19888b8cf97b51fa Mon Sep 17 00:00:00 2001 From: rasbt Date: Sun, 12 May 2024 09:27:38 -0500 Subject: [PATCH] basepath --- ch06/03_bonus_imdb-classification/train-bert-hf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ch06/03_bonus_imdb-classification/train-bert-hf.py b/ch06/03_bonus_imdb-classification/train-bert-hf.py index ef3773a..aa207c9 100644 --- a/ch06/03_bonus_imdb-classification/train-bert-hf.py +++ b/ch06/03_bonus_imdb-classification/train-bert-hf.py @@ -236,6 +236,8 @@ if __name__ == "__main__": pad_token_id = tokenizer.encode(tokenizer.pad_token) + base_path = "." + train_dataset = IMDBDataset(base_path / "train.csv", max_length=256, tokenizer=tokenizer, pad_token_id=pad_token_id) val_dataset = IMDBDataset(base_path / "val.csv", max_length=256, tokenizer=tokenizer, pad_token_id=pad_token_id) test_dataset = IMDBDataset(base_path / "test.csv", max_length=256, tokenizer=tokenizer, pad_token_id=pad_token_id)