mirror of
https://github.com/wassname/multifit.git
synced 2026-09-10 12:12:50 +08:00
misc
This commit is contained in:
@@ -51,4 +51,8 @@ def accuracy_binary(input, targs):
|
||||
return (input == targs).float().mean()
|
||||
|
||||
def mean_output(input, targs):
|
||||
input = torch.nn.functional.softmax(input, dim=-1)[:, 1]
|
||||
return input.mean()
|
||||
|
||||
def mean_target(input, targs):
|
||||
return targs.float().mean()
|
||||
|
||||
Reference in New Issue
Block a user