Skip to content
Snippets Groups Projects
Commit 5bc839af authored by gent's avatar gent
Browse files

import torch

parent 2383b97d
No related branches found
No related tags found
No related merge requests found
...@@ -265,7 +265,7 @@ def main(args): ...@@ -265,7 +265,7 @@ def main(args):
misc.init_distributed_mode(args) misc.init_distributed_mode(args)
print(args) print(args)
import torch
device = torch.device(args.device) device = torch.device(args.device)
# fix the seed for reproducibility # fix the seed for reproducibility
......
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) ByteDance, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
""" """
Mostly copy-paste from DEiT library: Example:
https://github.com/facebookresearch/deit/blob/main/main.py vitrun --nproc_per_node=3 eval_cls_ffcv.py --train_path $train_path --val_path $val_path --gin VisionTransformer.global_pool='\"avg\"' -w wandb:dlib/EfficientSSL/xsa4wubh --batch_size 360 --output_dir outputs/cls
""" """
from PIL import Image # hack to avoid `CXXABI_1.3.9' not found error from PIL import Image # hack to avoid `CXXABI_1.3.9' not found error
......
...@@ -106,6 +106,7 @@ def restart_from_checkpoint(ckp_path, run_variables=None, **kwargs): ...@@ -106,6 +106,7 @@ def restart_from_checkpoint(ckp_path, run_variables=None, **kwargs):
Re-start from checkpoint Re-start from checkpoint
""" """
if not os.path.isfile(ckp_path): if not os.path.isfile(ckp_path):
print("the file doesn't exist")
return return
print("Found checkpoint at {}".format(ckp_path)) print("Found checkpoint at {}".format(ckp_path))
if ckp_path.startswith('https'): if ckp_path.startswith('https'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment