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

Method __init__

tests/cdslib/script/test_base_train.py:39–56  ·  view source on GitHub ↗
(
            self,
            dim_w: int,
            dim_y: int,  # dataset size
            batch_size: int,
            lr: float = 1e-3,
            *args,
            **kwargs,
    )

Source from the content-addressed store, hash-verified

37 """
38
39 def __init__(
40 self,
41 dim_w: int,
42 dim_y: int, # dataset size
43 batch_size: int,
44 lr: float = 1e-3,
45 *args,
46 **kwargs,
47 ):
48 super().__init__(*args, **kwargs)
49
50 self.dim_w = dim_w
51 self.dim_y = dim_y
52 self.batch_size = batch_size
53 self.lr = lr
54 self._register_var_to_save(["dim_w", "dim_y"])
55
56 self._construct_data()
57
58 def _construct_data(self):
59 g = torch.Generator()

Callers

nothing calls this directly

Calls 3

_construct_dataMethod · 0.95
_register_var_to_saveMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected