nnpd.nre.training ================= .. py:module:: nnpd.nre.training .. autoapi-nested-parse:: Readable BCE training, including exact global-batch sharding for DDP. Functions --------- .. autoapisummary:: nnpd.nre.training.predict_logits nnpd.nre.training.classification nnpd.nre.training.fit_binary Module Contents --------------- .. py:function:: predict_logits(model, x, theta, batch_size: int, device) -> numpy.ndarray .. py:function:: classification(labels: numpy.ndarray, logits: numpy.ndarray) -> dict .. py:function:: fit_binary(context, model) -> dict No sample padding or dropping: every training row contributes once per epoch. A batch is split by rank. Local loss SUM * world/global_count compensates for DDP's gradient averaging even for unequal or empty last shards. An empty shard runs a zero-weight dummy forward to participate in collectives. The configured batch size is GLOBAL, not per GPU.