args module¶
-
class
args.BackwardStepConfig(parallel: bool = True, n_gpu: int = 4, ntrain: int = 48, ntest: int = 4, noise_std: float = 0.05, training_data_dir: str = '../step-training/', testing_data_dir: str = '../step-testing/', beta: float = 200, dx: float = 0.03125, dy: float = 0.03125, nu: float = 0.005, batch_size: int = 32, test_batch_size: int = 4, max_grad_norm: float = 0.01, nic: int = 4, glow_upscale: int = 2)¶ Bases:
objectConfiguration Dataclass to setup the model for the backward-step numerical test case.
-
batch_size: int = 32¶
-
beta: float = 200¶
-
dx: float = 0.03125¶
-
dy: float = 0.03125¶
-
glow_upscale: int = 2¶
-
max_grad_norm: float = 0.01¶
-
n_gpu: int = 4¶
-
nic: int = 4¶
-
noise_std: float = 0.05¶
-
ntest: int = 4¶
-
ntrain: int = 48¶
-
nu: float = 0.005¶
-
parallel: bool = True¶
-
test_batch_size: int = 4¶
-
testing_data_dir: str = '../step-testing/'¶
-
training_data_dir: str = '../step-training/'¶
-
-
class
args.CylinderConfig(parallel: bool = True, n_gpu: int = 4, ntrain: int = 96, ntest: int = 4, noise_std: float = 0.05, training_data_dir: str = '../cylinder-training/', testing_data_dir: str = '../cylinder-testing/', beta: float = 200, dx: float = 0.078125, dy: float = 0.078125, nu: float = 0.005, batch_size: int = 64, test_batch_size: int = 4, max_grad_norm: float = 1.0, nic: int = 3, glow_upscale: int = 4)¶ Bases:
objectConfiguration Dataclass to setup the model for the cylinder-array numerical test case.
-
batch_size: int = 64¶
-
beta: float = 200¶
-
dx: float = 0.078125¶
-
dy: float = 0.078125¶
-
glow_upscale: int = 4¶
-
max_grad_norm: float = 1.0¶
-
n_gpu: int = 4¶
-
nic: int = 3¶
-
noise_std: float = 0.05¶
-
ntest: int = 4¶
-
ntrain: int = 96¶
-
nu: float = 0.005¶
-
parallel: bool = True¶
-
test_batch_size: int = 4¶
-
testing_data_dir: str = '../cylinder-testing/'¶
-
training_data_dir: str = '../cylinder-training/'¶
-
-
class
args.Parser¶ Bases:
argparse.ArgumentParserProgram arguments, only a few are listed in the documentation.
- Parameters
exp-dir (string) – Directory to save experiments
exp-type (string) – Experiment type
parallel (bool) – Use parallel GPUs for training
n_gpu (int) – Number of GPUs to use for training, defaults to 1
training_data_dir (string) – File directory to training data
testing_data_dir (string) – File directory to testing data
ntrain (int) – Number of training data
ntest (int) – Number of testing data
epoch_start (int) – Epoch to start at, will load pre-trained network
epochs (int) – Number of epochs to train
lr (float) – ADAM optimizer learning rate
- Note
Use python main.py –help for more information. Only several key of arguments are listed here.
-
loadConfig(args)¶ Loads experimental configurations.
-
mkdirs(*directories)¶ Makes a directory if it does not exist
-
parse(dirs=True)¶ Parse program arguments Args: dirs (boolean): True to make file directories for predictions and models