MCPcopy Index your code
hub / github.com/TalwalkarLab/leaf / train

Method train

models/model.py:74–92  ·  view source on GitHub ↗

Trains the client model. Args: data: Dict of the form {'x': [list], 'y': [list]}. num_epochs: Number of epochs to train. batch_size: Size of training batches. Return: comp: Number of FLOPs computed while training given data

(self, data, num_epochs=1, batch_size=10)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

train_modelMethod · 0.45

Calls 2

run_epochMethod · 0.95
get_paramsMethod · 0.95

Tested by

no test coverage detected