pengzhiliang / Conformer

Official code for Conformer: Local Features Coupling Global Representations for Visual Recognition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

分本文档分类

wufj opened this issue · comments

您好,我看了您的论文,感觉对我们的研究贡献很大,但是有一点疑惑,如果我用贵网络来进行文本文档分类,--data-set是从['CIFAR', 'CIFAR10', 'IMNET', 'INAT', 'INAT19']选择哪个好点呢

Thanks for your kind words! ['CIFAR', 'CIFAR10', 'IMNET', 'INAT', 'INAT19'] are datasets for image classification. If you want to transfer Conformer to your own task, maybe you should define specific dataset.

谢谢您的回复,如果我定义文本文档相关的数据集,是不是得改很多代码呢,还是我指在['CIFAR', 'CIFAR10', 'IMNET', 'INAT', 'INAT19']加一个类就行呢

It depends on your dataset format, if your dataset format is as follows:

/path/to/your dataset/
  train/
    class1/
      img1.jpeg
    class2/
      img2.jpeg
  val/
    class1/
      img3.jpeg
    class/2
      img4.jpeg

Then you just need to add in the build_dataset() of dataset.py:

    elif args.data_set == 'YOUR DATASET NAME':
        root = os.path.join(args.data_path, 'train' if is_train else 'val')
        dataset = datasets.ImageFolder(root, transform=transform)
        nb_classes = XXXX

非常谢谢,我去试试!

You are welcome~