From e9a1d83035200c4849078fef55682fec69a1aff6 Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Mon, 31 May 2021 14:27:59 +0800 Subject: [PATCH] Update emlloss.py --- ppcls/losses/emlloss.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ppcls/losses/emlloss.py b/ppcls/losses/emlloss.py index 2ce93457..410e3478 100644 --- a/ppcls/losses/emlloss.py +++ b/ppcls/losses/emlloss.py @@ -86,15 +86,4 @@ class EmlLoss(paddle.nn.Layer): loss = self.surrogate_function_stable(self.beta, theta, bias, self.thresh) loss = paddle.mean(loss) return {"emlloss": loss} - -if __name__=="__main__": - - metric = EmlLoss() - - np.random.seed(1) - features = np.random.randn(40, 32) - features = paddle.to_tensor(features, dtype="float32") - print(features) - loss = metric(features) - print(loss) \ No newline at end of file -- GitLab