sketchgraphs_models.autoconstraint.model

Main module which implements the components of graph-based autoconstraint model.

Classes

AutoconstraintModel(model_core)

BidirectionalRecurrentModelCore(…[, depth])

GlobalEmbeddingModelCore(embedding_dim, …)

RecurrentEmbeddingModelCore(embedding_dim, …)

Functions

sketchgraphs_models.autoconstraint.model.compute_average_losses(data, losses)
sketchgraphs_models.autoconstraint.model.compute_losses(data, readout, reduction='sum')
sketchgraphs_models.autoconstraint.model.segment_stop_accuracy(partner_logits, segment_offsets, target_idx, stop_partner_index_index)

Computes the accuracy for stop prediction for partner logits.

sketchgraphs_models.autoconstraint.model.segment_stop_loss(partner_logits, segment_offsets, partner_index, stop_partner_index_index, reduction='sum')