wzh9969 / contrastive-htc

This repository implements a contrastive learning model for hierarchical text classification. This work has been accepted as the long paper "Incorporating Hierarchy into Text Encoder: a Contrastive Learning Approach for Hierarchical Text Classification" in ACL 2022.
MIT License
131 stars 30 forks source link

Problem in running train.py #3

Closed havelhakimi closed 2 years ago

havelhakimi commented 2 years ago

TypeError: 'NoneType' object is not subscriptable appears when I try to run the script train.py. can you suggest me possible reasons for this issue. The error is inside the first line of the function getitem(self, item) of the class BertDataset(Dataset)

Screenshot from 2022-06-06 20-26-39