utils
General functions for experiments and pytorch.
            View
    
              Bases: Module
Wrapper of torch's view method to use with nn.Sequential.
Source code in sdfest/vae/utils.py
                | 97 98 99 100 101 102 103 104 105 106 107 |  | 
            __init__(shape)
    Construct the module.
Source code in sdfest/vae/utils.py
              | 100 101 102 103 |  | 
            forward(x)
    Reshape the tensor.
Source code in sdfest/vae/utils.py
              | 105 106 107 |  | 
            load_checkpoint(path, model, optimizer)
    Load a checkpoint during training.
Args:
Source code in sdfest/vae/utils.py
              | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |  | 
            save_checkpoint(path, model, optimizer, iteration, epoch, run_name)
    Save a checkpoint during training.
Args:
Source code in sdfest/vae/utils.py
              | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |  | 
            str_to_tsdf(x)
    Convert string to expected values for tsdf setting.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| x | str | A string containing either some representation of False or a float. | required | 
Returns: False or float.
Source code in sdfest/vae/utils.py
              | 84 85 86 87 88 89 90 91 92 93 94 |  |