main
Keyu Tian 1 year ago committed by GitHub
parent f2ffa9b9cb
commit 74552bc23e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pretrain/README.md

@ -20,7 +20,7 @@ Then you can use `--model=your_convnet` in the pretraining script.
## Tutorial for pretraining your own dataset
See the comment of function `build_dataset_to_pretrain` in [line55 of /pretrain/utils/imagenet.py](/pretrain/utils/imagenet.py#L55) to yours.
See the comment of function `build_dataset_to_pretrain` in [line55 of /pretrain/utils/imagenet.py](/pretrain/utils/imagenet.py#L55).
Define a subclass of `torch.utils.data.Dataset` for your own unlabeled dataset, to replace our `ImageNetDataset`. Use `args.data_path` and `args.input_size` to help build your dataset, with `--data_path=... --input_size=...` to specify them.
Note the batch size `--bs` is the total batch size of all GPU, which may need to be adjusted based on your dataset size. For instance, we use `--bs=4096` for ImageNet, which contains 1.28 million images.

Loading…
Cancel
Save