Skip to content

Instantly share code, notes, and snippets.

View xx025's full-sized avatar
🎯
Focusing

Rycbar123 xx025

🎯
Focusing
View GitHub Profile
@xx025
xx025 / compute_mean_std.py
Last active September 24, 2023 04:24
计算数据集的均值和方差
import json
import os
import torch
from torchvision.datasets import ImageFolder
from torchvision.transforms import ToTensor, PILToTensor
from tqdm import tqdm
def main(data_path, save_name, out_dir='./', is_to01=False):