EntropicOTBenchmark
收藏Continuous Entropic OT (Schrodinger Bridge) Benchmark
数据集概述
该数据集包含一组连续基准分布,用于测试EOT/SB(Entropic Optimal Transport/Schrodinger Bridge)求解器在二次成本下的性能。数据集来源于Nikita Gushchin等人在NeurIPS 2023发表的论文《Building the Bridge of Schrödinger: A Continuous Entropic Optimal Transport Benchmark》。
数据集结构
notebooks/mixtures_benchmark_visualization_eot.ipynb:可视化图像基准对,计算指标示例。notebooks/mixtures_benchmark_visualization_sb.ipynb:可视化最优过程的轨迹,计算指标示例。notebooks/images_benchmark_visualization.ipynb:可视化图像基准对。notebooks/images_langevin_sampling.ipynb:从噪声样本中获取去噪样本。notebooks/plot_mixtures_results_eot.ipynb:绘制EOT方法在混合基准上的定性结果(PCA投影)。notebooks/plot_mixtures_results_sb.ipynb:绘制SB方法在混合对上的定量结果(KL/RKL)。benchmark_construction_examples:如何从数据构建基准对的示例。
数据加载
混合基准对
python from eot_benchmark.gaussian_mixture_benchmark import ( get_guassian_mixture_benchmark_sampler, get_guassian_mixture_benchmark_ground_truth_sampler, get_test_input_samples, )
DIM = 16 # 2,16,64,128 EPS = 0.1 # 0.1, 1, 10 BATCH_SIZE = 1024 GPU_DEVICE = 0
input_sampler = get_guassian_mixture_benchmark_sampler(input_or_target="input", dim=DIM, eps=EPS, batch_size=BATCH_SIZE, device=f"cuda:{GPU_DEVICE}", download=True)
target_sampler = get_guassian_mixture_benchmark_sampler(input_or_target="target", dim=DIM, eps=EPS, batch_size=BATCH_SIZE, device=f"cuda:{GPU_DEVICE}", download=True)
ground_truth_plan_sampler = get_guassian_mixture_benchmark_ground_truth_sampler(dim=DIM,eps=EPS, batch_size=BATCH_SIZE , device=f"cuda:{GPU_DEVICE}", download=True)
图像基准对
python import torch from matplotlib import pyplot as plt from eot_benchmark.image_benchmark import ImageBenchmark
EPS = 0.1 GPU_DEVICE = 0
benchmark = ImageBenchmark(batch_size=20, eps=EPS, glow_device=f"cuda:{GPU_DEVICE}", samples_device=f"cuda:{GPU_DEVICE}", download=False)
X_sampler = benchmark.X_sampler Y_sampler = benchmark.Y_sampler GT_sampler = benchmark.GT_sampler
测试图像数据集
测试图像数据集(用于cFID,每个“y”对应5k个“x”)可通过以下链接获取:链接。这些是int8张量,使用torch.load加载。标准FID的测试集可通过内置函数自动下载。
python X_test_sampler = benchmark.X_test_sampler Y_test_sampler = benchmark.Y_test_sampler

- 1Building the Bridge of Schrödinger: A Continuous Entropic Optimal Transport Benchmark · 2023年



