andy-wyx commited on
Commit
a8b0c52
·
1 Parent(s): e3307dd

update getting logits

Browse files
Files changed (1) hide show
  1. inference_resnet_v2.py +1 -1
inference_resnet_v2.py CHANGED
@@ -68,7 +68,7 @@ def inference_resnet_finer_v2(x,model,size=384,n_classes=142,n_top=10):
68
  # print(predictions)
69
  logits = model.predict(np.array([x]))
70
  print(logits)
71
- logits = tf.nn.softmax(logits[1][0]).cpu().numpy()
72
  print(logits)
73
  top_n = select_top_n(logits,n=n_top)
74
  print(top_n)
 
68
  # print(predictions)
69
  logits = model.predict(np.array([x]))
70
  print(logits)
71
+ logits = tf.nn.softmax(logits[0][0]).cpu().numpy()
72
  print(logits)
73
  top_n = select_top_n(logits,n=n_top)
74
  print(top_n)