dixisouls commited on
Commit
2c4ca43
·
1 Parent(s): 7db49ff

SOS error resolve

Browse files
Files changed (1) hide show
  1. app/image_captioning_service.py +1 -1
app/image_captioning_service.py CHANGED
@@ -295,7 +295,7 @@ class ImageCaptioningModel(torch.nn.Module):
295
  img_features = img_features.unsqueeze(1)
296
 
297
  # Start with < SOS > token
298
- current_ids = torch.tensor([[vocab.word2idx['< SOS >']]], dtype=torch.long).to(image.device)
299
 
300
  # Generate words one by one
301
  result_caption = []
 
295
  img_features = img_features.unsqueeze(1)
296
 
297
  # Start with < SOS > token
298
+ current_ids = torch.tensor([[vocab.word2idx['<SOS>']]], dtype=torch.long).to(image.device)
299
 
300
  # Generate words one by one
301
  result_caption = []