From 172ce4ba49d2f86a032c6d66b3d5298081642e92 Mon Sep 17 00:00:00 2001 From: "Jinwoo Park (Curt)" Date: Mon, 17 Mar 2025 16:05:58 +0900 Subject: [PATCH] Update functions.py --- schp/modules/functions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schp/modules/functions.py b/schp/modules/functions.py index 4eff6ae..49a5946 100644 --- a/schp/modules/functions.py +++ b/schp/modules/functions.py @@ -42,6 +42,8 @@ class InPlaceABN(autograd.Function): # Apply activation if ctx.activation == 'leaky_relu': x_norm = torch.where(x_norm > 0, x_norm, x_norm * ctx.slope) + else: + raise NotImplementedError() ctx.save_for_backward(x_norm, var, weight, bias) ctx.mark_non_differentiable(running_mean, running_var) @@ -127,6 +129,8 @@ class InPlaceABNSync(autograd.Function): # Apply activation if ctx.activation == 'leaky_relu': x_norm = torch.where(x_norm > 0, x_norm, x_norm * ctx.slope) + else: + raise NotImplementedError() ctx.save_for_backward(x_norm, var, weight, bias) ctx.mark_non_differentiable(running_mean, running_var)