Custom Criterion #1113
-
Hey everyone, I want to change the criterion for every experience. I used the code from #604 (comment) and changed it a bit. I need different weights for each experience, because I have got a dataset with unbalanced data. In the below, i posted my code. My question is, how can I validate, that this code works. When I print out strategy.criterion in the train loop, I cannot verify, that these loss functions are in use. Has anybody got any idea or had this problem before? loss_fun_0 = CrossEntropyLoss(weight=exp_0_weights) class ClassWeights(SupervisedPlugin):
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use a debugger and put a breakpoint in your function. Alternatively, you can put a print inside your function to check if it is called. |
Beta Was this translation helpful? Give feedback.
You can use a debugger and put a breakpoint in your function. Alternatively, you can put a print inside your function to check if it is called.