"""Setup constants, ymmv."""
import torch

PIN_MEMORY = True  # if this is false, data prefetching makes no sense
BENCHMARK = True
MULTITHREAD_DATAPROCESSING = 0  # maximal number of cpu processors used
MIXED_PRECISION = False
GRAD_SCALING = False  # this is a no-op if mixed-precision is off

DISTRIBUTED_BACKEND = 'nccl'
SHARING_STRATEGY = 'file_descriptor'  # file_system or file_descriptor

DEFAULT_SETUP = dict(dtype=torch.float, device=torch.device("cpu"), memory_format=torch.contiguous_format)
# memory format is .contiguous_format or .channels_last

cifar10_mean = [0.4914672374725342, 0.4822617471218109, 0.4467701315879822]
cifar10_std = [0.24703224003314972, 0.24348513782024384, 0.26158785820007324]
cifar100_mean = [0.5071598291397095, 0.4866936206817627, 0.44120192527770996]
cifar100_std = [0.2673342823982239, 0.2564384639263153, 0.2761504650115967]
mnist_mean = (0.13066373765468597,)
mnist_std = (0.30810782313346863,)
imagenet_mean = [0.485, 0.456, 0.406]
imagenet_std = [0.229, 0.224, 0.225]
tiny_imagenet_mean = [0.4789886474609375, 0.4457630515098572, 0.3944724500179291]
tiny_imagenet_std = [0.27698642015457153, 0.2690644860267639, 0.2820819020271301]
