未验证 提交 e9a1d830 编写于 作者: B Bin Lu 提交者: GitHub

Update emlloss.py

上级 adfd5c4c
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册