Kimata commited on
Commit
87811d3
·
1 Parent(s): e830b77

make directory paths delimiters compatible to ubuntu

Browse files
Files changed (1) hide show
  1. inference.py +3 -3
inference.py CHANGED
@@ -68,7 +68,7 @@ def model_summary(args):
68
  def load_multimodal_model(args):
69
  '''Load multimodal model'''
70
  model = ETMC(args)
71
- ckpt = torch.load('checkpoints\model_best.pt', map_location = torch.device('cpu'))
72
  model.load_state_dict(ckpt,strict = False)
73
  model.eval()
74
  return model
@@ -76,14 +76,14 @@ def load_multimodal_model(args):
76
  def load_img_modality_model(args):
77
  '''Loads image modality model.'''
78
  rgb_encoder = image.ImageEncoder(args)
79
- ckpt = torch.load('checkpoints\model_best.pt', map_location = torch.device('cpu'))
80
  rgb_encoder.load_state_dict(ckpt,strict = False)
81
  rgb_encoder.eval()
82
  return rgb_encoder
83
 
84
  def load_spec_modality_model(args):
85
  spec_encoder = image.RawNet(args)
86
- ckpt = torch.load('checkpoints\model_best.pt', map_location = torch.device('cpu'))
87
  spec_encoder.load_state_dict(ckpt,strict = False)
88
  spec_encoder.eval()
89
  return spec_encoder
 
68
  def load_multimodal_model(args):
69
  '''Load multimodal model'''
70
  model = ETMC(args)
71
+ ckpt = torch.load('checkpoints/model_best.pt', map_location = torch.device('cpu'))
72
  model.load_state_dict(ckpt,strict = False)
73
  model.eval()
74
  return model
 
76
  def load_img_modality_model(args):
77
  '''Loads image modality model.'''
78
  rgb_encoder = image.ImageEncoder(args)
79
+ ckpt = torch.load('checkpoints/model_best.pt', map_location = torch.device('cpu'))
80
  rgb_encoder.load_state_dict(ckpt,strict = False)
81
  rgb_encoder.eval()
82
  return rgb_encoder
83
 
84
  def load_spec_modality_model(args):
85
  spec_encoder = image.RawNet(args)
86
+ ckpt = torch.load('checkpoints/model_best.pt', map_location = torch.device('cpu'))
87
  spec_encoder.load_state_dict(ckpt,strict = False)
88
  spec_encoder.eval()
89
  return spec_encoder