MCPcopy Create free account
hub / github.com/apple/ml-pointersect / save

Method save

pointersect/inference/structures.py:1493–1503  ·  view source on GitHub ↗
(
            self,
            output_dir: str,
            overwrite: bool = False,
    )

Source from the content-addressed store, hash-verified

1491 setattr(self, name, arr)
1492
1493 def save(
1494 self,
1495 output_dir: str,
1496 overwrite: bool = False,
1497 ):
1498 if os.path.exists(output_dir) and not overwrite:
1499 raise RuntimeError
1500 os.makedirs(output_dir, exist_ok=True)
1501
1502 filename = os.path.join(output_dir, 'state_dict.pt')
1503 torch.save(self.state_dict(), filename)
1504
1505 def get_rgbd_image(
1506 self,

Callers

nothing calls this directly

Calls 2

state_dictMethod · 0.95
saveMethod · 0.45

Tested by

no test coverage detected