from local
This commit is contained in:
parent
2b0fe8696a
commit
2c7c3cc221
Binary file not shown.
@ -265,7 +265,10 @@ def decode_one_batch(
|
|||||||
batch_size = nnet_output.size(0)
|
batch_size = nnet_output.size(0)
|
||||||
for i in range(batch_size):
|
for i in range(batch_size):
|
||||||
topk_log_probs, topk_indexes = nnet_output[i].topk(1)
|
topk_log_probs, topk_indexes = nnet_output[i].topk(1)
|
||||||
print(topk_indexes.squeeze())
|
topk_indexes = topk_indexes.squeeze().unique_consecutive()
|
||||||
|
topk_indexes = topk_indexes[topk_indexes != 0]
|
||||||
|
print(topk_indexes.size())
|
||||||
|
#print(topk_indexes.squeeze())
|
||||||
|
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user