Skip to content

Commit

Permalink
feat: Add compute FLOPs flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyYang0714 committed Aug 7, 2024
1 parent c834f28 commit 456e3da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vis4d/common/ckpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def load_from_local(
filename = osp.expanduser(filename)
if not osp.isfile(filename):
raise FileNotFoundError(f"{filename} can not be found.")
checkpoint = torch.load(filename, map_location=map_location)
checkpoint = torch.load(
filename, weights_only=True, map_location=map_location
)
return checkpoint


Expand Down
1 change: 1 addition & 0 deletions vis4d/pl/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def main(argv: ArgsType) -> None:
hyper_params,
config.seed,
ckpt_path if not resume else None,
config.compute_flops,
)
data_module = DataModule(config.data)

Expand Down
1 change: 1 addition & 0 deletions vis4d/zoo/base/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def get_default_cfg(
config.use_tf32 = False
config.tf32_matmul_precision = "highest"
config.benchmark = False
config.compute_flops = False

return config

Expand Down

0 comments on commit 456e3da

Please sign in to comment.