(root_dir, args)
| 125 | return total_norm |
| 126 | |
| 127 | def get_experiment_dir(root_dir, args): |
| 128 | # if args.pretrained is not None and 'Latte-XL-2-256x256.pt' not in args.pretrained: |
| 129 | # root_dir += '-WOPRE' |
| 130 | if args.use_compile: |
| 131 | root_dir += '-Compile' # speedup by torch compile |
| 132 | if args.fixed_spatial: |
| 133 | root_dir += '-FixedSpa' |
| 134 | if args.enable_xformers_memory_efficient_attention: |
| 135 | root_dir += '-Xfor' |
| 136 | if args.gradient_checkpointing: |
| 137 | root_dir += '-Gc' |
| 138 | if args.mixed_precision: |
| 139 | root_dir += '-Amp' |
| 140 | if args.image_size == 512: |
| 141 | root_dir += '-512' |
| 142 | return root_dir |
| 143 | |
| 144 | ################################################################################# |
| 145 | # Training Logger # |
no outgoing calls
no test coverage detected