Closed Mainakdeb closed 3 years ago
Hi!
I think the function postprocess_preds
function can be improved further by using boolean indices like this :
def postprocess_preds(self, preds):
"""
Args:
preds (numpy.ndarray): array that needs to be postprocessed.
"""
for i in range(1, len(preds)):
mask = preds[i] <= preds[i-1]
preds[i][mask] = preds[i-1][mask]
return(preds)
Analysis (on 1000x1000 np.ndarray):
Interesting, can you provide us with the benchmarks which shows the speedup in devolearn
? You can make the modifications in your own fork and test it out on colab.
cc: @Mainakdeb
Interesting, can you provide us with the benchmarks which shows the speedup in
devolearn
? You can make the modifications in your own fork and test it out on colab.cc: @Mainakdeb
Hi, I tried out the new post-processing function suggested by @ABD-01 on a sample video. Seems like this technique works well for higher dimensional numpy ndarays, but the difference is barely noticeable in the arrays we are working with.
cc: @Mayukhdeb