NeuralNetBinaryClassifier was not working with torch.compile because the non-linearity was not correctly inferred. This inference depends on the instance type of the criterion. However, when using torch.compile, the criterion is wrapped, resulting in the isinstance check to miss. Now, we unwrap the criterion before checking the instance type.
Fixes #1057
NeuralNetBinaryClassifier
was not working withtorch.compile
because the non-linearity was not correctly inferred. This inference depends on the instance type of the criterion. However, when usingtorch.compile
, the criterion is wrapped, resulting in theisinstance
check to miss. Now, we unwrap the criterion before checking the instance type.