hw-du / CBiT

Implementation of the paper "Contrastive Learning with Bidirectional Transformers for Sequential Recommendation".
GNU General Public License v3.0
26 stars 6 forks source link

AttributeError #1

Closed ZZZZZZZZeng closed 1 year ago

ZZZZZZZZeng commented 1 year ago

There is no ‘args.slide_window_step’ attribution in this ‘options.py’ file

-------------erro code:----------------- 发生异常: AttributeError 'Namespace' object has no attribute 'slide_window_step' File "/home/liuhao/zkx/CBiT-master/dataloaders/bert.py", line 32, in init self.train_slidewindow, self.train_slidewindow_by_user, self.user_count_slidewindow = self.get_train_dataset_slidewindow(args.slide_window_step) File "/home/liuhao/zkx/CBiT-master/main.py", line 16, in train train_loader, val_loader, test_loader = BertDataloader(args, dataset).get_pytorch_dataloaders() File "/home/liuhao/zkx/CBiT-master/main.py", line 28, in train()

hw-du commented 1 year ago

You may find this hyperparameter at the last line of templates.py: args.slide_window_step = 10 if 'ml' in args.dataset_code else 1

ZZZZZZZZeng commented 1 year ago

You may find this hyperparameter at the last line of templates.py: args.slide_window_step = 10 if 'ml' in args.dataset_code else 1

Thank you for your answer. I found that there was a problem in my Settings, which has been solved now.