Spaces:
Sleeping
Sleeping
update getting logits
Browse files- 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[
|
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)
|