BloodAxe/pytorch-toolbelt

Feature request add an option to pass activation function to TTA

ternaus opened this issue · 1 comments

https://github.com/BloodAxe/pytorch-toolbelt/blob/develop/pytorch_toolbelt/inference/tta.py#L135

In many cases averaging logits works worse than averaging probabilities => would be nice to be able to pass user-defined activation function. For example softmax or sigmoid.

A better option would be to apply desired functions on the model itself:

https://github.com/BloodAxe/Kaggle-2019-Blindness-Detection/blob/master/retinopathy/inference.py#L159