Commit 6c82eb88 authored by zhe chen's avatar zhe chen
Browse files

Fix the issue of the missing val.txt (#163)

parent 1ccf7825
...@@ -12,7 +12,7 @@ import torch.distributed as dist ...@@ -12,7 +12,7 @@ import torch.distributed as dist
from timm.data import Mixup, create_transform from timm.data import Mixup, create_transform
from torchvision import transforms from torchvision import transforms
from .cached_image_folder import ImageCephDataset from .cached_image_folder import CachedImageFolder, ImageCephDataset
from .samplers import NodeDistributedSampler, SubsetRandomSampler from .samplers import NodeDistributedSampler, SubsetRandomSampler
try: try:
...@@ -214,7 +214,7 @@ def build_dataset(split, config): ...@@ -214,7 +214,7 @@ def build_dataset(split, config):
on_memory=config.DATA.IMG_ON_MEMORY) on_memory=config.DATA.IMG_ON_MEMORY)
elif prefix == 'val': elif prefix == 'val':
root = os.path.join(config.DATA.DATA_PATH, 'val') root = os.path.join(config.DATA.DATA_PATH, 'val')
dataset = ImageCephDataset(root, 'val', transform=transform) dataset = CachedImageFolder(root, transform=transform)
nb_classes = 1000 nb_classes = 1000
elif config.DATA.DATASET == 'imagenet22K': elif config.DATA.DATASET == 'imagenet22K':
if prefix == 'train': if prefix == 'train':
......
...@@ -24,5 +24,5 @@ PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ ...@@ -24,5 +24,5 @@ PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
--cfg ${CONFIG} \ --cfg ${CONFIG} \
--accumulation-steps 1 \ --accumulation-steps 1 \
--local-rank 0 \ --local-rank 0 \
--data-path /mnt/lustre/share/images \ --data-path data/imagenet \
--output work_dirs ${@:4} --output work_dirs ${@:4}
...@@ -23,5 +23,5 @@ PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ ...@@ -23,5 +23,5 @@ PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
python -u main_deepspeed.py \ python -u main_deepspeed.py \
--cfg ${CONFIG} \ --cfg ${CONFIG} \
--local-rank 0 \ --local-rank 0 \
--data-path /mnt/lustre/share/images \ --data-path data/imagenet \
--output work_dirs_deepspeed ${@:4} --output work_dirs_deepspeed ${@:4}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment