MCPcopy Create free account
hub / github.com/pytorch/examples / load_train_objs

Function load_train_objs

distributed/ddp-tutorial-series/multigpu.py:69–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67
68
69def load_train_objs():
70 train_set = MyTrainDataset(2048) # load your dataset
71 model = torch.nn.Linear(20, 1) # load your model
72 optimizer = torch.optim.SGD(model.parameters(), lr=1e-3)
73 return train_set, model, optimizer
74
75
76def prepare_dataloader(dataset: Dataset, batch_size: int):

Callers 1

mainFunction · 0.70

Calls 1

MyTrainDatasetClass · 0.90

Tested by

no test coverage detected