MCPcopy Create free account
hub / github.com/pytorch/tutorials / __init__

Method __init__

advanced_source/pendulum.py:528–536  ·  view source on GitHub ↗
(self, td_params=None, seed=None, device="cpu")

Source from the content-addressed store, hash-verified

526 batch_locked = False
527
528 def __init__(self, td_params=None, seed=None, device="cpu"):
529 if td_params is None:
530 td_params = self.gen_params()
531
532 super().__init__(device=device, batch_size=[])
533 self._make_spec(td_params)
534 if seed is None:
535 seed = torch.empty((), dtype=torch.int64).random_().item()
536 self.set_seed(seed)
537
538 # Helpers: _make_step and gen_params
539 gen_params = staticmethod(gen_params)

Callers 1

_initFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected