[{"data":1,"prerenderedAt":980},["ShallowReactive",2],{"navigation":3,"\u002Falgorithms\u002Ftransport\u002Fchoosing":174,"\u002Falgorithms\u002Ftransport\u002Fchoosing-surround":975},[4,8,101,165,170],{"title":5,"path":6,"stem":7},"Getting started","\u002Fgetting-started","1.getting-started",{"title":9,"path":10,"stem":11,"children":12},"Algorithms","\u002Falgorithms","2.algorithms",[13,15,58],{"title":9,"path":10,"stem":14},"2.algorithms\u002Findex",{"title":16,"path":17,"stem":18,"children":19},"Assignment","\u002Falgorithms\u002Fassignment","2.algorithms\u002F1.assignment\u002Findex",[20,21,25,29,32,36,40],{"title":16,"path":17,"stem":18},{"title":22,"path":23,"stem":24},"Quickstart","\u002Falgorithms\u002Fassignment\u002Fquickstart","2.algorithms\u002F1.assignment\u002F1.quickstart",{"title":26,"path":27,"stem":28},"Tracking","\u002Falgorithms\u002Fassignment\u002Ftracking","2.algorithms\u002F1.assignment\u002F2.tracking",{"title":9,"path":30,"stem":31},"\u002Falgorithms\u002Fassignment\u002Falgorithms","2.algorithms\u002F1.assignment\u002F3.algorithms",{"title":33,"path":34,"stem":35},"Reference","\u002Falgorithms\u002Fassignment\u002Freference","2.algorithms\u002F1.assignment\u002F4.reference",{"title":37,"path":38,"stem":39},"Choosing","\u002Falgorithms\u002Fassignment\u002Fchoosing","2.algorithms\u002F1.assignment\u002F5.choosing",{"title":41,"path":42,"stem":43,"children":44},"Tutorials","\u002Falgorithms\u002Fassignment\u002Ftutorials","2.algorithms\u002F1.assignment\u002F6.tutorials\u002Findex",[45,46,50,54],{"title":41,"path":42,"stem":43},{"title":47,"path":48,"stem":49},"Fundamentals","\u002Falgorithms\u002Fassignment\u002Ftutorials\u002Ffundamentals","2.algorithms\u002F1.assignment\u002F6.tutorials\u002F1.fundamentals",{"title":51,"path":52,"stem":53},"Backends","\u002Falgorithms\u002Fassignment\u002Ftutorials\u002Fbackends","2.algorithms\u002F1.assignment\u002F6.tutorials\u002F2.backends",{"title":55,"path":56,"stem":57},"Object tracking","\u002Falgorithms\u002Fassignment\u002Ftutorials\u002Ftracking","2.algorithms\u002F1.assignment\u002F6.tutorials\u002F3.tracking",{"title":59,"path":60,"stem":61,"children":62},"Transport","\u002Falgorithms\u002Ftransport","2.algorithms\u002F2.transport\u002Findex",[63,64,67,71,74,77,80,84],{"title":59,"path":60,"stem":61},{"title":22,"path":65,"stem":66},"\u002Falgorithms\u002Ftransport\u002Fquickstart","2.algorithms\u002F2.transport\u002F1.quickstart",{"title":68,"path":69,"stem":70},"Point-cloud tutorial","\u002Falgorithms\u002Ftransport\u002Fpoint-clouds","2.algorithms\u002F2.transport\u002F2.point-clouds",{"title":9,"path":72,"stem":73},"\u002Falgorithms\u002Ftransport\u002Falgorithms","2.algorithms\u002F2.transport\u002F3.algorithms",{"title":33,"path":75,"stem":76},"\u002Falgorithms\u002Ftransport\u002Freference","2.algorithms\u002F2.transport\u002F4.reference",{"title":37,"path":78,"stem":79},"\u002Falgorithms\u002Ftransport\u002Fchoosing","2.algorithms\u002F2.transport\u002F5.choosing",{"title":81,"path":82,"stem":83},"Building","\u002Falgorithms\u002Ftransport\u002Fbuilding","2.algorithms\u002F2.transport\u002F6.building",{"title":41,"path":85,"stem":86,"children":87},"\u002Falgorithms\u002Ftransport\u002Ftutorials","2.algorithms\u002F2.transport\u002F7.tutorials\u002Findex",[88,89,93,97],{"title":41,"path":85,"stem":86},{"title":90,"path":91,"stem":92},"Optimal transport","\u002Falgorithms\u002Ftransport\u002Ftutorials\u002Foptimal-transport","2.algorithms\u002F2.transport\u002F7.tutorials\u002F1.optimal-transport",{"title":94,"path":95,"stem":96},"Sinkhorn","\u002Falgorithms\u002Ftransport\u002Ftutorials\u002Fsinkhorn","2.algorithms\u002F2.transport\u002F7.tutorials\u002F2.sinkhorn",{"title":98,"path":99,"stem":100},"Point clouds","\u002Falgorithms\u002Ftransport\u002Ftutorials\u002Fpoint-clouds","2.algorithms\u002F2.transport\u002F7.tutorials\u002F3.point-clouds",{"title":102,"path":103,"stem":104,"children":105},"Resources","\u002Fresources","3.resources",[106,108,147,151,155],{"title":102,"path":103,"stem":107},"3.resources\u002Findex",{"title":41,"path":109,"stem":110,"children":111},"\u002Fresources\u002Ftutorials","3.resources\u002F1.tutorials\u002Findex",[112,113,131],{"title":41,"path":109,"stem":110},{"title":16,"path":114,"stem":115,"children":116,"page":130},"\u002Fresources\u002Ftutorials\u002Fassignment","3.resources\u002F1.tutorials\u002Fassignment",[117,122,126],{"title":118,"path":119,"stem":120,"icon":121},"Tutorial 1 — The Assignment Problem","\u002Fresources\u002Ftutorials\u002Fassignment\u002F01_the_assignment_problem","3.resources\u002F1.tutorials\u002Fassignment\u002F01_the_assignment_problem","i-lucide-notebook",{"title":123,"path":124,"stem":125,"icon":121},"Tutorial 2 — Backends and Batching","\u002Fresources\u002Ftutorials\u002Fassignment\u002F02_backends_and_batching","3.resources\u002F1.tutorials\u002Fassignment\u002F02_backends_and_batching",{"title":127,"path":128,"stem":129,"icon":121},"Tutorial 3 — Object Tracking with the Assignment Problem","\u002Fresources\u002Ftutorials\u002Fassignment\u002F03_object_tracking","3.resources\u002F1.tutorials\u002Fassignment\u002F03_object_tracking",false,{"title":59,"path":132,"stem":133,"children":134,"page":130},"\u002Fresources\u002Ftutorials\u002Ftransport","3.resources\u002F1.tutorials\u002Ftransport",[135,139,143],{"title":136,"path":137,"stem":138,"icon":121},"Tutorial 1 — What Is Optimal Transport?","\u002Fresources\u002Ftutorials\u002Ftransport\u002F01_optimal_transport","3.resources\u002F1.tutorials\u002Ftransport\u002F01_optimal_transport",{"title":140,"path":141,"stem":142,"icon":121},"Tutorial 2 — The Sinkhorn Algorithm","\u002Fresources\u002Ftutorials\u002Ftransport\u002F02_sinkhorn_algorithm","3.resources\u002F1.tutorials\u002Ftransport\u002F02_sinkhorn_algorithm",{"title":144,"path":145,"stem":146,"icon":121},"Tutorial 3 — Point-Cloud OT and Shape Learning","\u002Fresources\u002Ftutorials\u002Ftransport\u002F03_point_clouds","3.resources\u002F1.tutorials\u002Ftransport\u002F03_point_clouds",{"title":148,"path":149,"stem":150},"Assignment applications","\u002Fresources\u002Fassignment-applications","3.resources\u002F2.assignment-applications",{"title":152,"path":153,"stem":154},"Transport applications","\u002Fresources\u002Ftransport-applications","3.resources\u002F3.transport-applications",{"title":156,"path":157,"stem":158,"children":159},"Benchmarks","\u002Fresources\u002Fbenchmarks","3.resources\u002F4.benchmarks\u002Findex",[160,161],{"title":156,"path":157,"stem":158},{"title":162,"path":163,"stem":164},"Contributing benchmarks","\u002Fresources\u002Fbenchmarks\u002Fcontributing","3.resources\u002F4.benchmarks\u002Fcontributing",{"title":166,"path":167,"stem":168,"icon":169},"API Reference","\u002Fapi","4.api","i-lucide-package",{"title":171,"path":172,"stem":173},"References","\u002Freferences","5.references",{"id":175,"title":176,"api":177,"body":178,"description":968,"extension":969,"links":970,"meta":971,"navigation":972,"path":78,"seo":973,"stem":79,"__hash__":974},"docs\u002F2.algorithms\u002F2.transport\u002F5.choosing.md","Choosing the right backend","direct",{"type":179,"value":180,"toc":949},"minimark",[181,197,202,205,253,260,281,286,304,308,367,371,378,414,420,446,453,519,526,556,567,626,639,725,729,828,832,918,923,927,945],[182,183,184,188,189,192,193,196],"p",{},[185,186,187],"code",{},"torchmatch.transport.matrix.solve"," resolves ",[185,190,191],{},"Backend.AUTO"," to ",[185,194,195],{},"LOG_SINKHORN"," in all cases.\nRead this page to understand or override that choice, or when deciding between the matrix and samples entry points (called faces in this library).",[198,199,201],"h2",{"id":200},"matrix-vs-samples-face","Matrix vs samples face",[182,203,204],{},"The first decision is which entry point to use:",[206,207,212],"pre",{"className":208,"code":209,"language":210,"meta":211,"style":211},"language-mermaid shiki shiki-themes material-theme-lighter github-light github-dark","flowchart TD\n    A[Input type?] --> B{Pre-computed cost\u003Cbr\u002F>matrix available?}\n    B -->|Yes| C[transport.matrix.solve]\n    B -->|No — raw point clouds| D{Hardware?}\n    D -->|CUDA| E[transport.samples.loss]\n    D -->|CPU only| F[Compute cost matrix\u003Cbr\u002F>→ transport.matrix.solve]\n","mermaid","",[185,213,214,223,229,235,241,247],{"__ignoreMap":211},[215,216,219],"span",{"class":217,"line":218},"line",1,[215,220,222],{"class":221},"su5hD","flowchart TD\n",[215,224,226],{"class":217,"line":225},2,[215,227,228],{"class":221},"    A[Input type?] --> B{Pre-computed cost\u003Cbr\u002F>matrix available?}\n",[215,230,232],{"class":217,"line":231},3,[215,233,234],{"class":221},"    B -->|Yes| C[transport.matrix.solve]\n",[215,236,238],{"class":217,"line":237},4,[215,239,240],{"class":221},"    B -->|No — raw point clouds| D{Hardware?}\n",[215,242,244],{"class":217,"line":243},5,[215,245,246],{"class":221},"    D -->|CUDA| E[transport.samples.loss]\n",[215,248,250],{"class":217,"line":249},6,[215,251,252],{"class":221},"    D -->|CPU only| F[Compute cost matrix\u003Cbr\u002F>→ transport.matrix.solve]\n",[182,254,255,256,259],{},"Use ",[185,257,258],{},"transport.samples.loss"," when:",[261,262,263,267,274],"ul",{},[264,265,266],"li",{},"Both point clouds are already on CUDA.",[264,268,269,270,273],{},"The cost is squared Euclidean ",[185,271,272],{},"|x - y|^2"," (currently the only cost supported).",[264,275,276,277,280],{},"You want to avoid allocating an ",[185,278,279],{},"N × M"," cost matrix.",[182,282,255,283,259],{},[185,284,285],{},"transport.matrix.solve",[261,287,288,291,294,297],{},[264,289,290],{},"Your cost function is not squared Euclidean (e.g. cosine, L1, KL divergence).",[264,292,293],{},"You need CPU support.",[264,295,296],{},"You have already computed or cached the cost matrix.",[264,298,299,300,303],{},"You need the full transport plan — a matrix P where each entry P",[215,301,302],{},"i,j"," describes how much mass is moved from source point i to target point j (not just a single summary scalar).",[198,305,307],{"id":306},"backend-decision-tree-matrix-face","Backend decision tree (matrix face)",[206,309,311],{"className":208,"code":310,"language":210,"meta":211,"style":211},"flowchart TD\n    A[transport.matrix.solve] --> B{Need a scalar loss\u003Cbr\u002F>to train against?}\n    B -->|Yes, symmetric divergence| C[SINKHORN_DIVERGENCE]\n    B -->|Yes, asymmetric OK| D{Unequal mass\u003Cbr\u002F>or outliers?}\n    B -->|No — need the full plan| E[LOG_SINKHORN]\n\n    D -->|Yes| F[UNBALANCED_SINKHORN]\n    D -->|No| G{Exact plan\u003Cbr\u002F>required?}\n    G -->|Yes| H[EXACT_EMD]\n    G -->|No| I[LOG_SINKHORN]\n",[185,312,313,317,322,327,332,337,343,349,355,361],{"__ignoreMap":211},[215,314,315],{"class":217,"line":218},[215,316,222],{"class":221},[215,318,319],{"class":217,"line":225},[215,320,321],{"class":221},"    A[transport.matrix.solve] --> B{Need a scalar loss\u003Cbr\u002F>to train against?}\n",[215,323,324],{"class":217,"line":231},[215,325,326],{"class":221},"    B -->|Yes, symmetric divergence| C[SINKHORN_DIVERGENCE]\n",[215,328,329],{"class":217,"line":237},[215,330,331],{"class":221},"    B -->|Yes, asymmetric OK| D{Unequal mass\u003Cbr\u002F>or outliers?}\n",[215,333,334],{"class":217,"line":243},[215,335,336],{"class":221},"    B -->|No — need the full plan| E[LOG_SINKHORN]\n",[215,338,339],{"class":217,"line":249},[215,340,342],{"emptyLinePlaceholder":341},true,"\n",[215,344,346],{"class":217,"line":345},7,[215,347,348],{"class":221},"    D -->|Yes| F[UNBALANCED_SINKHORN]\n",[215,350,352],{"class":217,"line":351},8,[215,353,354],{"class":221},"    D -->|No| G{Exact plan\u003Cbr\u002F>required?}\n",[215,356,358],{"class":217,"line":357},9,[215,359,360],{"class":221},"    G -->|Yes| H[EXACT_EMD]\n",[215,362,364],{"class":217,"line":363},10,[215,365,366],{"class":221},"    G -->|No| I[LOG_SINKHORN]\n",[198,368,370],{"id":369},"rules-of-thumb","Rules of thumb",[372,373,375,377],"h3",{"id":374},"log_sinkhorn-the-default",[185,376,195],{}," — the default",[261,379,380,383,390,393,400],{},[264,381,382],{},"Differentiable, CPU + CUDA.",[264,384,385,386,389],{},"Returns the transport plan in log-space (i.e. log P); call ",[185,387,388],{},".exp()"," to recover P, an N × M matrix whose entries describe how much mass each source point sends to each target point.",[264,391,392],{},"Use when you need the plan itself (e.g. to compute expected cost, to derive soft\nattention, or as a soft assignment for downstream tasks).",[264,394,395,396,399],{},"The raw inner-product loss does not reach zero even when the two distributions are identical (because the entropic regularisation adds a fixed bias). When the loss value matters for comparisons, prefer ",[185,397,398],{},"SINKHORN_DIVERGENCE",".",[264,401,402,403,406,407,410,411,413],{},"Tune ",[185,404,405],{},"reg"," (default 0.1) and ",[185,408,409],{},"n_iter"," (default 100). Smaller ",[185,412,405],{}," → sharper plan,\nmore iterations needed.",[372,415,417,419],{"id":416},"sinkhorn_divergence-symmetric-training-loss",[185,418,398],{}," — symmetric training loss",[261,421,422,425,432,440],{},[264,423,424],{},"Runs the Sinkhorn algorithm three times — once between your two distributions and once for each distribution against itself — then subtracts the self-transport terms to cancel the bias introduced by regularisation, giving a true zero when the two distributions match.",[264,426,427,428,431],{},"Returns a scalar ≥ 0 (or ",[185,429,430],{},"(B,)"," tensor); equals 0 when the source and target\ndistributions are identical.",[264,433,434,435,439],{},"The recommended choice for ",[436,437,438],"strong",{},"generative-model training"," where the loss must be\ninterpretable and symmetric.",[264,441,442,443,445],{},"About 3× slower than ",[185,444,195],{},"; the main cost at large N is computing the two extra N × N distance matrices (one for each distribution against itself).",[372,447,449,452],{"id":448},"unbalanced_sinkhorn-partial-matching-and-outliers",[185,450,451],{},"UNBALANCED_SINKHORN"," — partial matching and outliers",[261,454,455,462,473,484],{},[264,456,457,458,461],{},"Instead of requiring every source point to send exactly its prescribed mass and every target to receive exactly its prescribed amount (the balanced constraint), this backend allows each point to send or receive less than required — penalising the shortfall with a KL-divergence penalty controlled by ",[185,459,460],{},"rho",". Each point can therefore \"leak\" mass rather than being forced to pair with a distant counterpart.",[264,463,464,465,468,469,472],{},"Returns the transport plan in log-space; the total mass assigned to each source point and each target point will be close to, but not exactly, the prescribed weights ",[185,466,467],{},"a"," (source) and ",[185,470,471],{},"b"," (target).",[264,474,475,476,479,480,483],{},"Use when the source and target have ",[436,477,478],{},"different total mass",", or when ",[436,481,482],{},"outlier points","\nshould not distort the coupling.",[264,485,486,487,489,490,493,494,493,497,500,501,504,505],{},"Control via ",[185,488,460],{}," (API default 1.0) or ",[185,491,492],{},"reach"," \u002F ",[185,495,496],{},"reach_x",[185,498,499],{},"reach_y"," in ",[185,502,503],{},"samples.loss",":\n",[261,506,507,513],{},[264,508,509,512],{},[185,510,511],{},"reach → ∞",": recovers balanced OT, enforcing marginal constraints (the requirement that the total mass sent from each source sums to a_i, and the total mass received at each target sums to b_j).",[264,514,515,518],{},[185,516,517],{},"reach = 0.1",": heavy relaxation; outliers are nearly ignored. At reach=0.1, the solver is quite permissive: source points that cannot be cheaply matched simply contribute less mass to the coupling rather than being forced to pair with a distant target.",[372,520,522,525],{"id":521},"exact_emd-exact-plan-small-problems",[185,523,524],{},"EXACT_EMD"," — exact plan, small problems",[261,527,528,531,538,544,549],{},[264,529,530],{},"Uses the network simplex algorithm (a classic exact combinatorial solver) — no regularisation, fully deterministic.",[264,532,533,534,537],{},"Returns the exact coupling; plan is sparse (at most ",[185,535,536],{},"N + M − 1"," non-zero entries).",[264,539,540,543],{},[436,541,542],{},"Not differentiable",": the plan is a step function with discontinuous argmax.",[264,545,546,399],{},[436,547,548],{},"CPU only",[264,550,551,552,555],{},"Use for ground-truth comparisons, benchmarks, or small problems where numerical exactness\nis required. At ",[185,553,554],{},"N = M = 256"," expect about 50–200 ms per problem.",[198,557,559,560,562,563,566],{"id":558},"picking-reg-matrix-face-and-blur-samples-face","Picking ",[185,561,405],{}," (matrix face) and ",[185,564,565],{},"blur"," (samples face)",[568,569,570,586],"table",{},[571,572,573],"thead",{},[574,575,576,580],"tr",{},[577,578,579],"th",{},"Goal",[577,581,582,493,584],{},[185,583,405],{},[185,585,565],{},[587,588,589,598,606,614],"tbody",{},[574,590,591,595],{},[592,593,594],"td",{},"Soft, smooth plan (attention-like)",[592,596,597],{},"high (0.5 – 2.0)",[574,599,600,603],{},[592,601,602],{},"Moderate smoothing",[592,604,605],{},"medium (0.05 – 0.5)",[574,607,608,611],{},[592,609,610],{},"Approximately sharp plan",[592,612,613],{},"low (0.005 – 0.05)",[574,615,616,619],{},[592,617,618],{},"Very sharp (near exact)",[592,620,621,622,625],{},"very low + ",[185,623,624],{},"scaling=0.5"," + many iterations",[182,627,628,629,631,632,635,636,638],{},"Smaller ",[185,630,405],{}," converges more slowly. Use ",[185,633,634],{},"scaling"," to start the solver at a coarse regularisation level and gradually tighten it, which reaches convergence faster when ",[185,637,405],{}," is very small:",[206,640,644],{"className":641,"code":642,"language":643,"meta":211,"style":211},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","log_plan = torchmatch.transport.matrix.solve(\n    cost, reg=0.01, n_iter=500, scaling=0.5,\n)\n","python",[185,645,646,679,720],{"__ignoreMap":211},[215,647,648,651,655,658,661,665,667,670,672,676],{"class":217,"line":218},[215,649,650],{"class":221},"log_plan ",[215,652,654],{"class":653},"smGrS","=",[215,656,657],{"class":221}," torchmatch",[215,659,399],{"class":660},"sP7_E",[215,662,664],{"class":663},"skxfh","transport",[215,666,399],{"class":660},[215,668,669],{"class":663},"matrix",[215,671,399],{"class":660},[215,673,675],{"class":674},"slqww","solve",[215,677,678],{"class":660},"(\n",[215,680,681,684,687,691,693,697,699,702,704,707,709,712,714,717],{"class":217,"line":225},[215,682,683],{"class":674},"    cost",[215,685,686],{"class":660},",",[215,688,690],{"class":689},"s99_P"," reg",[215,692,654],{"class":653},[215,694,696],{"class":695},"srdBf","0.01",[215,698,686],{"class":660},[215,700,701],{"class":689}," n_iter",[215,703,654],{"class":653},[215,705,706],{"class":695},"500",[215,708,686],{"class":660},[215,710,711],{"class":689}," scaling",[215,713,654],{"class":653},[215,715,716],{"class":695},"0.5",[215,718,719],{"class":660},",\n",[215,721,722],{"class":217,"line":231},[215,723,724],{"class":660},")\n",[198,726,728],{"id":727},"comparing-by-use-case","Comparing by use case",[568,730,731,741],{},[571,732,733],{},[574,734,735,738],{},[577,736,737],{},"Use case",[577,739,740],{},"Recommended",[587,742,743,753,763,773,783,793,803,814],{},[574,744,745,748],{},[592,746,747],{},"Generative shape loss (training)",[592,749,750],{},[185,751,752],{},"samples.loss(x, y, debias=True)",[574,754,755,758],{},[592,756,757],{},"Generative shape loss (fast, no bias correction needed)",[592,759,760],{},[185,761,762],{},"samples.loss(x, y)",[574,764,765,768],{},[592,766,767],{},"Soft differentiable matching (plan needed)",[592,769,770],{},[185,771,772],{},"matrix.solve(C, backend=LOG_SINKHORN)",[574,774,775,778],{},[592,776,777],{},"Symmetric distance for evaluation",[592,779,780],{},[185,781,782],{},"matrix.solve(C, backend=SINKHORN_DIVERGENCE)",[574,784,785,788],{},[592,786,787],{},"Domain adaptation (partial overlap)",[592,789,790],{},[185,791,792],{},"matrix.solve(C, backend=UNBALANCED_SINKHORN)",[574,794,795,798],{},[592,796,797],{},"Outlier-robust point-cloud loss",[592,799,800],{},[185,801,802],{},"samples.loss(x, y, reach=0.5)",[574,804,805,808],{},[592,806,807],{},"Reference \u002F ground-truth plan",[592,809,810,813],{},[185,811,812],{},"matrix.solve(C, backend=EXACT_EMD)"," (small N)",[574,815,816,819],{},[592,817,818],{},"Needs CPU",[592,820,821,824,825,827],{},[185,822,823],{},"matrix.solve(C)"," — any backend except ",[185,826,524],{}," for large N",[198,829,831],{"id":830},"tracing-requirements","Tracing requirements",[568,833,834,844],{},[571,835,836],{},[574,837,838,841],{},[577,839,840],{},"Requirement",[577,842,843],{},"OK to use",[587,845,846,854,872,889,904],{},[574,847,848,851],{},[592,849,850],{},"Eager mode",[592,852,853],{},"All backends",[574,855,856,861],{},[592,857,858],{},[185,859,860],{},"torch.compile",[592,862,863,865,866,865,868,865,870],{},[185,864,195],{},", ",[185,867,398],{},[185,869,451],{},[185,871,503],{},[574,873,874,879],{},[592,875,876,878],{},[185,877,860],{}," with backward",[592,880,881,882,885,886],{},"same as above; all register ",[185,883,884],{},"FakeTensor"," and ",[185,887,888],{},"register_autograd",[574,890,891,896],{},[592,892,893],{},[185,894,895],{},"torch.export",[592,897,898,865,900,865,902],{},[185,899,195],{},[185,901,398],{},[185,903,451],{},[574,905,906,909],{},[592,907,908],{},"CUDA graphs",[592,910,911,865,913,865,915,917],{},[185,912,195],{},[185,914,398],{},[185,916,451],{}," (no host syncs)",[182,919,920,922],{},[185,921,524],{}," does not trace (network simplex is not differentiable and has data-dependent\ncontrol flow).",[198,924,926],{"id":925},"see-also","See also",[261,928,929,934,939],{},[264,930,931,933],{},[467,932,9],{"href":72},": mathematical derivation of each backend.",[264,935,936,938],{},[467,937,33],{"href":75},": full signatures and kwargs.",[264,940,941,944],{},[467,942,943],{"href":38},"Assignment \u002F Choosing",": the equivalent guide for the LAP solvers.",[946,947,948],"style",{},"html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":211,"searchDepth":231,"depth":231,"links":950},[951,952,953,963,965,966,967],{"id":200,"depth":225,"text":201},{"id":306,"depth":225,"text":307},{"id":369,"depth":225,"text":370,"children":954},[955,957,959,961],{"id":374,"depth":231,"text":956},"LOG_SINKHORN — the default",{"id":416,"depth":231,"text":958},"SINKHORN_DIVERGENCE — symmetric training loss",{"id":448,"depth":231,"text":960},"UNBALANCED_SINKHORN — partial matching and outliers",{"id":521,"depth":231,"text":962},"EXACT_EMD — exact plan, small problems",{"id":558,"depth":225,"text":964},"Picking reg (matrix face) and blur (samples face)",{"id":727,"depth":225,"text":728},{"id":830,"depth":225,"text":831},{"id":925,"depth":225,"text":926},"A decision guide for transport.matrix and transport.samples backends, organised by cost type, differentiability requirements, and problem scale.","md",null,{},{"title":37},{"title":176,"description":968},"2aLZL2MN4tfAGcL1Pl31ZaxDYUZ2Ff7CD-BEtw4PcJw",[976,978],{"title":33,"path":75,"stem":76,"description":977,"children":-1},"Input rules, surface overview, and graph-capture notes for torchmatch.transport ops.",{"title":81,"path":82,"stem":83,"description":979,"children":-1},"Wheel vs JIT runtime paths, build-time and runtime environment variables, CPU SIMD flags, and source layout.",1785218164193]