MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / scale_lr

Function scale_lr

tools/test_linear_probing_hf.py:216–218  ·  view source on GitHub ↗

Scale learning rate based on batch size.

(learning_rate: float, batch_size: int)

Source from the content-addressed store, hash-verified

214# ============================================================================
215
216def scale_lr(learning_rate: float, batch_size: int) -> float:
217 """Scale learning rate based on batch size."""
218 return learning_rate * (batch_size * get_world_size()) / 256.0
219
220
221def setup_linear_classifiers(

Callers 1

setup_linear_classifiersFunction · 0.85

Calls 1

get_world_sizeFunction · 0.85

Tested by

no test coverage detected