(dir, ext=".pt")
| 103 | fout.write(str(waypoint) + "\n") |
| 104 | |
| 105 | def get_all_file_from_dir(dir, ext=".pt"): |
| 106 | out_files = [] |
| 107 | for root, dirs, files in os.walk(dir): |
| 108 | for file in files: |
| 109 | if file.endswith(ext): |
| 110 | file_path = os.path.join(root, file) |
| 111 | out_files.append(file_path) |
| 112 | return out_files |
| 113 | |
| 114 | @torch.no_grad() |
| 115 | def decode_latents(model, latents): |