neuralop.training.torch_setup.setup

neuralop.training.torch_setup.setup(config)[source]

A convenience function to intialize the device, setup torch settings and check multi-grid and other values. It sets up distributed communitation, if used.

Parameters:
configdict

this function checks: * config.distributed (use_distributed, seed) * config.data (n_train, batch_size, test_batch_sizes, n_tests, test_resolutions)

Returns:
device, is_logger

device : torch.device is_logger : bool