mirror of
https://github.com/wassname/multifit.git
synced 2026-10-29 13:20:17 +08:00
misc
This commit is contained in:
1 parent
67da707648
commit
8d9f6cb60c
1 file changed
+4
@@ -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