From 36d557e87ff356a87ca6e6c8f8c92a45014e1d33 Mon Sep 17 00:00:00 2001 From: Yang Yu <35400026+YangYu-NUAA@users.noreply.github.com> Date: Tue, 28 Mar 2023 22:26:34 +0800 Subject: [PATCH] Update MMD_RBF.py --- MMD_RBF.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MMD_RBF.py b/MMD_RBF.py index e1f5f4f..d21b21a 100644 --- a/MMD_RBF.py +++ b/MMD_RBF.py @@ -1,3 +1,7 @@ +import numpy as np +import torch +import torch.nn.functional as F + def mmd_rbf(source, target, kernel_mul=2.0, kernel_num=5, fix_sigma=None): ''' 计算MMD距离,使用RBF核函数