subhc commited on
Commit
d08ffbd
1 Parent(s): 7151f8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -38,11 +38,8 @@ from mask_former_trainer import setup, Trainer
38
 
39
  def load_model_cfg(dataset=None):
40
 
41
- args = SimpleNamespace(config_file='configs/maskformer/maskformer_R50_bs16_160k_dino.yaml', opts=["GWM.DATASET", dataset], wandb_sweep_mode=False, resume_path=str('checkpoints/checkpoint_best.pth'), eval_only=True)
42
  cfg = setup(args)
43
- cfg.defrost()
44
- cfg.MODEL.DEVICE = 'cpu'
45
- cfg.freeze()
46
  random_state = ut.random_state.PytorchRNGState(seed=cfg.SEED).to(torch.device(cfg.MODEL.DEVICE))
47
 
48
  model = Trainer.build_model(cfg)
 
38
 
39
  def load_model_cfg(dataset=None):
40
 
41
+ args = SimpleNamespace(config_file='configs/maskformer/maskformer_R50_bs16_160k_dino.yaml', opts=["MODEL.DEVICE", "cpu", "GWM.DATASET", dataset], wandb_sweep_mode=False, resume_path=str('checkpoints/checkpoint_best.pth'), eval_only=True)
42
  cfg = setup(args)
 
 
 
43
  random_state = ut.random_state.PytorchRNGState(seed=cfg.SEED).to(torch.device(cfg.MODEL.DEVICE))
44
 
45
  model = Trainer.build_model(cfg)