Skip to content

Roadmap

H.P. Gansevoort edited this page Nov 2, 2026 · 49 revisions

Roadmap

In short

This page lists what DeepSharp has built and what it will build, in the order the work is done. What is done comes first, and below it what is still to come; a row stands here when it is asked for.

The one rule behind the order: nothing stands above a row it needs. Among the rows that are free to move, the one a reader reaches for most often, and pays least for, comes first.

There are no dates — a row moves when it is true, and the changelog is where it says so.

The table gives one line per row. The first row says all there is to say; every other row has a section of its own below, under its own name.

What it is In one line
Done Shape, Tensor, ITensorBackend, CpuBackend Everything else is written in terms of these.
Done Pipeline The artefact PDD is named after: declared once, fitted on train alone, replayed unchanged.
Done Notebook The same pipeline as a Verso notebook, one block per step.
Done DeepSharp.Verso.Api and DeepSharp.Verso.Serve The notebook hosted in an application of your own, and DeepSharp's own server.
Done Automatic differentiation The gradient a network learns by.
Done The layers Each a forward pass and its gradient, matched against PyTorch on the same rows.
Done Losses and optimizers The parts that turn a gradient into a change.
Done The training loop Batches, epochs, validation, early stopping, checkpoints and history — and a network trained behind a pipeline.
Done The two vocabularies Keras's words or PyTorch's, lowered onto the same model, bit for bit.
Done The charts DeepSharp.Charts: what a run keeps, drawn as SVG with MatPlotLibNet.
Done A TorchSharp backend The same model, its arithmetic on libtorch, on the processor or a graphics card.
Done Loading what already exists Reading a model trained elsewhere, from PyTorch, Keras and ONNX files.
Done Settling a gap before the features are worked out settle.gaps: a value no row decided, written where the features are worked out.
Done A trainer from ML.NET Boosted trees and a forest, measured beside a network on the same rows.
Done A course to fill in Every step of a pipeline in its order, waiting for what only a person knows.
Done Live sources A source that answers differently each time, fetched once and landed as a file.
Done Optimizing Searching for a network, answers that are a distribution, and what the pipeline owes a network.
Done Everything a window can be Every convolution and pooling setting that used to be refused, built.
Done Everything the parts can be told Every layer and optimizer setting that used to be refused, built.
Done What the flock team asked for a third time Bins, a periodic embedding, how alike the splits are, a better search, averaged weights, a per-key history.
Done The vocabulary a model is written in The activations, normalisations, losses and measures other libraries write.
Done A model watched after it ships The rows a served model meets, measured window by window against the training rows its pipeline keeps.
Done Training further from what was read A rate of its own for a group of layers, and the low-rank pair beside a held kernel.
Done Data that is not a table Images, sound and text read in as rows, varied while training only, and text cut into tokens.
Done Several networks, one answer Networks trained apart — a study's best, or one design under other seeds — answering together.
Done The answer and what it is worth Splits that cut more than once, an interval around the answer, and why a model answers as it does.
Done What the flock team asked for a fourth time The light engine's products and Adam's step faster by the very same bits, a rate that follows the training loss, a history over its last few places, and a study that prepares a pipeline for every candidate.
Done A network that is not a straight line Branches: a residual block, a block that reads everything made before it, two inputs and a U, written, read and saved.
Done A row that remembers An LSTM and a GRU, in one direction or both, to the last state or at every step, over series of unequal lengths.
Done Attention, and what it attends over Attention, its many-headed form, the positions of the steps, and one encoder block as PyTorch makes it.
Done Writing what others can read DeepSharp.Export.Onnx: a trained network written as an ONNX graph and answered through by ONNX Runtime.
Done A table of its own A model that reads a table a column at a time was built and measured against ML.NET's trees, and not kept.
Done The engine's own arithmetic Numbers kept in half the width with a full-width copy, a scaled loss, a sum of gradients kept wide, and layers worked out again to fit a larger batch.
Done More than one graphics card One run spread over two cards was built and measured against one card taking two batches to a step, and not kept.
Done Smaller numbers to serve with A trained model in whole numbers of eight bits was built and measured against the answers it gave before, and not kept.
Done What the flock team asked for a fifth time A split or a shuffle may rank by a declared id, a study may stop a trial between deals, and a trainer from ML.NET may be fitted and asked to predict without a pipeline.
Done Starting and training a layer A schedule that warms up before it decays by a cosine, three more optimizers, a batch stepped over more than it is read, and a running average of the weights.
Done Shaping what a network can be A gated feed-forward block, training one network on what another already answered, and a tabular network that answers as an ensemble of itself.
Done A search judged by more than one number A study choosing between candidates on one trade-off alone, where two or more are really being weighed against each other.
Done A margin per kind of row, and a correlation matrix without a pipeline A conformal margin from the caller's own errors, and CorrelationMatrix.From, both reachable outside any pipeline.
Done A model trained outside DeepSharp, counted as a study's own Study<TModel> tries candidates trained by a function of the caller's, and ModelEnsemble<TModel> answers as several of them blended, the sampler, the deals and the stopping staying the library's.
Done A history over rows already answered history.known reads a key's rows already answered since the pipeline was fitted, validation and test rows included, below a split in time.

What is done

Pipeline

The artefact PDD is named after: collect, settle the gaps, add features, split, name what a model is asked to predict, fill and normalise, and name the network those rows train. It is declared once, fitted on train alone, replayed unchanged on everything after, and the answers are brought back in their own units.

It came first because every later row is written in terms of it, and because the leak it prevents is invisible once it has happened. See Pipeline.

Notebook

The same pipeline written as a Verso notebook, one block per step:

  • the data, a profile and a heatmap at any block;
  • its columns chosen from the grid or a list, saved beside it and taken over again.

It runs in Verso's VS Code extension, in verso serve, in DeepSharp's own server and in an application of your own. It needed only the pipeline, so it did not wait for the rows below. See Notebook.

DeepSharp.Verso.Api and DeepSharp.Verso.Serve

The notebook's two sister packages:

  • DeepSharp.Verso.Api lets an application of your own host the notebook — opening it, passing a click on, the toolbar and the properties panel, the layouts, the themes and the title, saving, and every view of a notebook told what changed — done for the application rather than by it. Drawing what a block shows stays the application's.
  • DeepSharp.Verso.Serve is DeepSharp's own server built on it: deepsharp-serve shows the notebook in a browser and does there what Verso's browser editor does, with nothing else to install.

What the two would share is kept in one place when there is something to share. Like the notebook, they needed only the pipeline.

Automatic differentiation

A network learns by knowing which way to move. Without a gradient there is no training loop, so this is the one piece nothing can be faked around.

The layers

  • Dense, the activations, dropout, batch and layer normalisation.
  • Convolutions along one, two and three axes — in groups, depthwise, dilated, strided on their own for each axis — and the transposed ones that give those places back.
  • Max and average poolings, global poolings and the poolings to a size.
  • The layers that only pad, the dropouts of whole channels, flattening and reshaping.

Each is a forward pass and its gradient, each starting and working as PyTorch's does, matched against it on the same rows.

Losses and optimizers

The parts that turn a gradient into a change:

  • Losses: mean squared error, cross-entropy and binary cross-entropy, each saying how a network's numbers are read, and the earth mover's distance for shares in an order.
  • Optimizers: SGD with momentum, Adam, AdamW, RMSprop and Nadam as PyTorch writes them, open to an optimizer of your own.
  • A learning-rate schedule: constant, stepped, exponential, a cosine or a warm-up — with gradients clipped by their norm.

The training loop

  • Batches, epochs, validation, and early stopping as Keras's.
  • Checkpoints a run goes on from bit for bit on the engine they were taken on.
  • The history the charts are drawn from.

Through DeepSharp.Learners.Networks, a network is trained behind a pipeline — declared in that pipeline's own chain and trained by pipeline.Train(), or written as code and fitted by hand — measured by its report and kept with it as one file. See Networks.

The two vocabularies

Stack layers, compile and fit — the words TensorFlow and Keras use — or write the forward pass yourself, the way PyTorch does.

The declarative side is a builder that lowers onto the same model the imperative side produces, so nothing downstream knows which door was used — the same network, bit for bit, and the same file.

Both vocabularies can be spoken in the chain that prepares a pipeline's rows too:

  • .WithTensorflow(…) declares the network those rows train in the words TensorFlow and Keras use;
  • .WithTorch(…) declares it in the words PyTorch uses.

pipeline.Train() trains exactly that network, so the model is declared with the pipeline rather than written beside it. Each writes the number its own library leaves where a caller says none, so the file says which run was asked for.

The charts

DeepSharp.Charts, which draws with MatPlotLibNet:

  • the loss curve and the learning rate;
  • confusion matrices, predicted against actual, and the residuals;
  • the measures as bars.

All of it from what the loop and the measures already keep, as SVG, with no viewer to start.

A TorchSharp backend

The same model, running its arithmetic on libtorch, on the processor or a graphics card: DeepSharp.Backends.TorchSharp, TorchBackend.OnCpu() or OnGpu(0), handed to a run and to a trained network as it serves. It is held to the light engine operation by operation and step by step.

It is a package of its own: a project that does not want it never carries it, the application brings libtorch, and no model changes because of it.

Together with the training loop this is the short version of what the library does — you write it the way TensorFlow taught you, and Torch runs it. See TorchSharp backend.

Loading what already exists

Reading what was trained elsewhere, so a model does not have to begin here to run here.

The seam is in the core: IImporter, and network.Load, which puts numbers into a network by the path of each slot, all of them or none. Three packages implement it:

Package What it reads
DeepSharp.Import.PyTorch a safetensors file, and the .pt file torch.save writes, its pickle read as PyTorch's weights-only reader reads it
DeepSharp.Import.Keras the .keras and .h5 files Keras saves
DeepSharp.Import.Onnx the graphs PyTorch's exporters, Keras and tf2onnx write

A model read so is served, measured, or trained further behind a pipeline and kept with it as the one file. See Importing a model.

Settling a gap before the features are worked out

The problem. A feature is worked out from the columns as they stand, and a fill stands below the split because what it puts in a gap is learned from the training rows. So a sum of two columns one of which has a gap was itself a gap, and filling that column afterwards did not reach back into it.

The answer. settle.gaps is the other half: a nought, a number you choose, or a refusal — none of them a value any row decided — written where the features are worked out, so a feature after it is worked out from settled columns.

  • It learns nothing, so it writes nothing into the fitted half.
  • It marks where the gaps were as a fill does.
  • It is a verb of its own rather than the fill moved, which is why the pipeline file went to version 6.

A trainer from ML.NET

The prepared data handed to a trainer from ML.NET, for a table that a tree learns better than a network:

  • .WithML(trainer => trainer.FastTree()) names it in the chain.
  • pipeline.TrainWithML() runs the pipeline for what it needs — Needs.NoScale, so the scalings a tree does without are left out and written down.
  • The pipeline's own report then measures the tree and a network on the same rows, which is the only reason the two can honestly be compared.

It names boosted trees and a forest and no other trainer. A declaration promises that running it again gives the same model; measured on this library's rows the stochastic trainers do not keep that promise, while a tree keeps it from the seed the declaration carries.

It is two packages, because the library may not travel where the verb must: ML.NET learner.

A course to fill in

A pipeline written from nothing starts with an empty chain and a reader who has to know which verb comes where. A course is every step of a prepared pipeline in the order the steps belong, each present and waiting for what only a person knows — the file to read, the columns, the bounds — and starting everything else as its verb starts it.

There are two, because the rules say a table and a series in time cannot share one order: PipelineCourse.Table and PipelineCourse.SeriesInTime.

  • A course is a value. Say fills in a step, Waiting names what still waits, and Pdd.From starts a pipeline from one filled in all the way.
  • A course is a file of its own, read through the same door as the pipeline's and under the same version, so no pipeline file moves.
  • In the Notebook, two buttons write every step the blocks do not hold yet, each as the verb's skeleton with null where only you can say. A block added in DeepSharp's own host arrives as the step that belongs there instead of empty; Verso's own editors never ask a cell type what a cell starts with, so a block added there still starts empty.

See Starting from a course.

Live sources

A source that answers differently every time it is asked — an exchange's prices, an API — fetched once over a closed window and landed as a file, which the pipeline then reads like any other, by fingerprint. Each is in a package of its own, DeepSharp.Pipelines.<Source>, since it brings HTTP, retries and a pacer that a project serving a trained model has no use for.

DeepSharp.Pipelines.Binance lands the candles of a market on Binance: await pipeline.ReadBinanceAsync(new BinanceCandles("BTCEUR", "1d", from, to)) lands the window where it is not landed yet and adds an ordinary .ReadCsv of the file, beside a record of what was asked and what came back.

  • Asking again asks Binance nothing.
  • A file that was changed since is refused rather than replaced.
  • It goes as a guest at an address's shared budget — slowly, waiting once the address has used half of what a minute allows, and stopping at a ban.
  • The pipeline's file names the landed file and nothing of Binance, so serving the model never carries the package.

It stands on the readers. See Live sources.

Optimizing

What a network is trained with, searched for and measured by, and what the pipeline owes it:

  • Searching for a network — a study that chooses by the validation rows and keeps the test rows for the winner, testSeed to fix them, and a paired comparison of two pipelines;
  • answers that are a distribution in an order, with emd, kl and rps, the earth mover's loss and what a flock that arrived short leaves;
  • target.numbers;
  • two files as one source;
  • an id that travels with its rows;
  • a correlation worked out once as numbers, Pearson's and Spearman's;
  • a run that can be watched and stopped;
  • and Writing a step of your own.

Everything a window can be

What a convolution here covered was neighbouring places, one stride on every axis and the places that fit whole, and a source that said anything else was refused at the setting that said it. Those refusals are built:

  • a stride of its own for each axis;
  • a dilated window;
  • channels in groups, a depthwise and a separable convolution;
  • a transposed convolution;
  • a border that differs from side to side, and a layer that only pads;
  • a pooling that rounds the number of places up, and a pooling to a size other than one place.

Each is held to the proof the rest have — its values and its gradient matched to the framework that has it, on every engine — and each is read from the Keras, ONNX and PyTorch files that say it.

Nothing was added to the tensor seam for any of them: they are the unfolding and its fold, a matrix product, a reshape and the first-largest step, in another order. See Networks and Importing a model.

Everything the parts can be told

A layer here took what it needed and little else, and a source that said more was refused at the setting that said it. Those refusals are built.

On the layer's side:

  • a layer without a bias, and a normalisation without its scale or its shift;
  • nine ways to start a weight or a bias;
  • a penalty the loss adds for weights that grow, and a bound on how large a unit's weights may become;
  • a layer held still while the rest learns;
  • the three borders a padding could not do — the one that mirrors, the one that repeats and the one that wraps.

On the other side of the step:

  • the weight decay PyTorch adds to the gradient of Sgd, Adam, RMSprop and Nadam;
  • Nesterov's momentum, dampening, AMSGrad, and RMSprop's centred form;
  • clipping each gradient value as well as the norm of all of them;
  • a step taken once every several batches;
  • an average of the weights kept beside them.

Each is held to the proof the rest have — matched, step by step, to the framework that has it, on every engine — and each is read from the Keras, ONNX and PyTorch files that say it. A part that says none of them is written as it always was, so every file an earlier release wrote still reads. Networks says which to reach for when.

What the flock team asked for a third time

A team that weighs flocks wrote for the third time, with what its rows asked of a network here. Each ask is built as this library builds everything: fitted on the training rows alone where it learns, replayed unchanged everywhere after.

  • A number written down as how far it fills a few bins whose edges the training rows place.
  • The periodic embedding of a number, its frequencies started from a spread the person says, since its authors searched that spread for every dataset.
  • A report of how alike training, validation and test are, column by column, that warns and never refuses.
  • A search that stops a hopeless trial, draws a setting only when another is chosen, and goes on from the trials it ran before.
  • A run judged by the average of its weights, so the best epoch it restores is the best average.
  • A running statistic of each key over its earlier training rows, which a single new flock is served with as the training rows were.

What the letter asked for that is refused is refused by name, with why, in the changelog. See Filling and scaling, Searching for a network and Measuring and drawing.

The vocabulary a model is written in

The words the libraries a model is read from write and this library did not:

  • Activations: the smooth ones a transformer is made of — GELU, exactly or by its tangent, SiLU and mish — the leaky, parametric and self-normalising ones, and softmax as a layer rather than only inside a loss.
  • Normalisations: over groups of channels, over one example's channels, and the one that scales without centring.
  • A category as a small vector learned over the columns its encoder writes it down as, which is one layer and no new arithmetic.
  • Losses: the absolute error, the one squared near nought and absolute away from it, the one that asks for a quantile rather than a mean, the one that leans on the rare class, the hinge, the one for counts, and cross-entropy with its labels softened.
  • Measures beside them: F1, the area under the curve a threshold sweeps out, the error as a share of the answer, and the Brier score with its reliability curve for whether a model that says seventy per cent is right seven times in ten.

It is one release because it was one kind of work done over and over: a forward pass, its gradient, a kind in the file, a read by the three readers — ONNX's both as its newer operators and as the several operators PyTorch's exporters spell each in for older sets — and the framework that has it to hold the numbers to.

The seam gained the sine and the error function for it and nothing more. See Networks, Importing a model and Measuring and drawing.

A model watched after it ships

The likeness of the parts measured how far training, validation and test lie apart, once, while every row was there; and a pipeline read from its file keeps what its steps learned, not the rows they learned it from. So nothing watched the rows a model met once it was served, and a model whose world had moved on went on answering as if it had not.

It is the same measurement turned the other way:

  • watch.reference (.Watch(warnAbove, columns…)), below the split, keeps the training rows of the columns it watches as counts — each value once with how many rows hold it — and changes nothing a replay does;
  • prepared.Watched(window) measures a window of served rows against them, column by column, by the same two distances the likeness of the parts takes, flagged above the watch's bound, each beside how many rows it was worked out from, and says when the window was;
  • nothing is learned from the served rows, so the reference stays the one the model was fitted on, and the windows are the caller's — DeepSharp.Charts draws them one beside another.

A model trained before its pipeline kept the rows is watched once both are made again. See Measuring and drawing.

Training further from what was read

A model read from elsewhere could be trained on further here, with no say over what moves but a hold: everything that was not held moved at one rate. Two things were missing, and both are built:

  • a rate of its own for a part of the network — a share of the run's rate, said of a layer or of a parameter, that the optimizer moves its numbers by on every optimizer; PyTorch's parameter group, held to PyTorch's numbers;
  • the low-rank pair beside a held kernel that has become how a large layer is adapted — a dense layer keeps it as Keras's enable_lora does, and a Keras model that has one is read in the archive Keras 3 saves and in the HDF5 file it saved before, answers as Keras answers, and is trained further with the kernel held.

A network that says neither is written as it always was, so every file an earlier release wrote still reads. See Networks.

Data that is not a table

Convolutions, embeddings and the activations a transformer is made of were built, and every row still had to arrive as a table: whoever had a folder of pictures turned the pixels into columns by hand first. Now:

  • a column of arrays, one of one shape a row, kept whole, and read by three readers — a folder of texts, of pictures and of recordings, a folder to a class — that state the size every file is read as and refuse a file of another, never resizing, cutting, mixing down or resampling;
  • a variation of the training rows only — a flip, a crop, noise — a layer of the network drawn from a seed of its own, so validation, test and every report are never varied and a run can be replayed;
  • a tokenizer that cuts text into ids, its vocabulary learned from the training rows alone, and a layer that averages the vectors it learns for a row's words.

What it does not do is keep the order of the words: that is a model of a sequence, and it waits under A row that remembers. See Reading a file, Pipeline and Networks.

Several networks, one answer

A study tried many networks and kept one, and a comparison said whether a change helped, but several trained networks could not answer together. Now a pipeline trains the best few of a study, or one design under other seeds, behind its one fit, and they answer as one: their answers averaged, or for classes their chances averaged or their votes counted, in the answer's own units. The same report measures the ensemble on the same rows as each of its members, so what it adds is a number, and it is kept as one file with the pipeline, refusing any other fit of it. See Searching for a network and Measuring and drawing.

The answer and what it is worth

Three things that touch the split, the report and nothing else, built together:

  • Splits that cut more than once. A fold makes each slice of a small table the validation rows in turn, and an origin moves the cut of a series forward and fits again, so what a model learned from always came before what it is chosen on; what the folds measured is laid beside itself, with their mean and spread.
  • A bound. Rows set aside before anything is fitted, the margin worked out from them once, and the answer handed back with an interval around it in its own units, for a network and for a tree alike.
  • Why. Which column the answer leans on, what happens to it as one column moves through its range, and what a single row's answer is made of, asked of the columns as they were read.

See Splitting the rows and Measuring and drawing.

What the flock team asked for a fourth time

A team that trains on a light engine asked where it could be made faster without a bit of any answer changing, and four things beside.

  • The light engine's product is worked a vector's width of columns at a time, in the order the terms stand, so every answer has the very bits it had; a layer of 70 by 128 went from 316 to 47 microseconds and a product of 2^24 multiply-adds from 17.3 to 2.6 milliseconds. A step of Adam is one pass over the numbers instead of about twenty operations, and a host may say how many threads one large product is spread over.
  • A rate that follows the training loss, lowered once the loss has stopped falling, never the validation loss.
  • A history over its last few places of the order, not every earlier row.
  • A study that prepares a pipeline for every candidate, and judges a model of several networks as the one model it is.

See Networks, Working out the features and Searching for a network; the changelog has the measured numbers.

A network that is not a straight line

A stack was a line: layers in order, each handed what the one before it made. A step may now take the work of any step before it, by name, so a residual block, a block that reads everything made before it, two inputs and a U can be written, read and saved.

  • a Sum adds what several steps made, a Concatenation lays them side by side along the last axis, and Columns takes some of a row's columns as a step of its own;
  • every step has a name, which is the path of what it holds, and the file says the steps each takes;
  • the three readers stop refusing a branch: ONNX's values, Keras's Functional model and PyTorch's modules arrive as they were.

No engine learned anything for it: the joins are made of the products and sums every engine has. A block that holds a description of its own is nested in code, in the file and in the readers; a declaration in a pipeline is a flat list of named steps. See Networks.

A row that remembers

The layers that carry a state from one step of a series to the next, as every library writes them: an LSTM and a GRU, in one direction or both, of one layer or several, to the last state or at every step. A batch of series of unequal lengths is read each as it would be read alone, by a mask a token embedding's padding makes, and the gradient runs back through the steps on the tape the engines already record. See Networks.

Attention, and what it attends over

Scaled dot-product attention, multi-head attention with PyTorch's slots, a mask of the padding and a causal mask, the sine positions of the steps, and one encoder block under the names PyTorch's TransformerEncoderLayer gives its state. A step with no key to look at is made nothing, as PyTorch makes it. A batch of series is multiplied block by block, by an engine that has that product (the light engine and libtorch do) and by the products every engine has on one that has not, so what attention costs grows in proportion to the batch. See Networks.

Writing what others can read

A trained network written as an ONNX graph, in a package of its own: a kind for every node, the two version numbers a graph carries, the oldest operator set that holds every node, and its own proof — every graph is answered through ONNX Runtime and held to the network's numbers. See Exporting a model.

Serving on that runtime is not built, and saying so is half of that design: a network trained behind a pipeline answers the rows the pipeline prepared, and a runtime that serves raw rows would answer other rows. A runtime that only answers is not an engine this library can train on.

A table of its own

A model that reads a table a column at a time, each column a token of its own, attended over, was built to be measured and not to be claimed: against ML.NET's boosted trees, on the same rows, by the pipeline's own measure, on five seeds, by a rule written down before the first run. It did not beat the trees by more than the spread of its own seeds on the passengers or on the bike-sharing days, so it is not kept; the numbers are in the changelog. What it was built from — attention and the encoder block — stays.

The engine's own arithmetic

An engine on libtorch can keep its work in half the width — Precision.BFloat16, or Precision.Half with a scaled loss — with the numbers a network learns kept at full width and moved by the optimizer. A sum of gradients is added at full width. A loss can be scaled so that small gradients survive, a step whose gradients are not numbers is skipped and the scale lowered, as PyTorch's gradient scaler does. And layers can have their workings thrown away and worked out again, so that a larger batch fits in the same memory.

All of it is a capability an engine may have or a part of the loop, none of it is a member of the seam, and none of it is hand-written GPU code. Each was held to a rule written down before the first run, and the numbers are in the changelog. Working layers out again pays most for attention, a recurrent layer and a block: four encoder blocks fit 3.5 times the batch, a stack of dense layers 1.15 times. See TorchSharp backend and Naming the network.

More than one graphics card

One run spread over two cards — each a share of the batch, the gradients added together — was built to be measured and not to be claimed. Against one card taking two batches to a step, which gives the same effective batch, two cards took 1.26 to 1.64 times as long, and 1.21 to 1.80 with a thread to a card, where the rule written down before the first run asked for at most 0.8 and at most 1.0. The copy between the cards is not what costs: the host that feeds one card's share and then the next's is, while the cards wait. So it is not kept, and StepEvery gives the same effective batch on one card.

Smaller numbers to serve with

A trained model kept in whole numbers of eight bits was built to be measured and not to be claimed, against the answers it gave before. The network of the passengers held at 0.294 of the memory and 0.91 of the time with no decision flipped; the network of the bike-sharing days held at 0.272 and 0.80, but its largest difference from the float network's answer was 1.19, 2.10 and 1.28 per cent of how far the answers range, where the rule asked for at most one in a hundred. It is not kept.

What the flock team asked for a fifth time

A team that weighs flocks wrote for the fifth time, with three things its own search already did without the library's help.

  • Ranking a split or a shuffle by a declared id. split.atRandom, split.stratified and shuffle ordinarily rank each row by a digest of the whole record, so a feature column added or dropped can move a row to another part. An id declared on the schema turns this off: the three then rank by the id alone, and every row that shares one lands together.
  • Stopping a trial between deals. A trial judged by several networks together ran every deal it was given, whatever the first one said; a Judge was refused beside a Pruner for the same reason a Pruner is refused beside a Score — a trial judged by one number must not be stopped by another. A study may now hear the trial's own judged number after each deal but the last, and stop there, saving the deals that would train for nothing.
  • Fitting a trainer from ML.NET on rows of your own, with no pipeline. Their own model trains two networks by hand, on targets they write themselves, outside any pipeline — the same position CompiledNetwork.Fit already lets a network stand in. A trainer from ML.NET now has that door too, and answering it uncovered a real bug of its own: a tree or a forest answering one of two classes answered ML.NET's own raw score where the rest of the library assumes a probability, now fixed for both doors.

See Splitting the rows, Searching for a network and ML.NET learner.

Starting and training a layer

A 2025–2026 look at PyTorch, TensorFlow and the wider training ecosystem found four things real use still reaches for that the library did not yet say in so many words — two of them, it turned out, already here on their own.

  • A schedule that warms up before it decays by a cosine. LinearWarmup and CosineDecay were both already here, each declared on its own; LinearWarmup already hands over to the schedule that follows it once its own epochs are spent, the same way PyTorch's SequentialLR does, so the composed schedule needed no third type: new LinearWarmup(epochs, start, then: new CosineDecay(epochs, minimum)) is the warm-up and the decay, declared as one.
  • Three more optimizers. Beside the five already here, three further ones a 2025–2026 look still finds in real use elsewhere, added by name: Lion, RAdam and Adan. PyTorch itself ships RAdam; Lion and Adan are each run as their own reference implementation does, lucidrains's lion-pytorch and sail-sg's Adan, named as such, since PyTorch ships neither.
  • A batch stepped over more than it is read. Gradient accumulation, FitOptions.StepEvery: the optimizer's step waits for several batches' gradients, averaged, rather than one, so a larger effective batch fits where the rows themselves do not, and a window never crosses an epoch's end.
  • A running average of the weights. FitOptions.Average and JudgedByAverage: an exponential moving average of the weights kept beside the ones a step actually moves, served and judged from instead of them once asked, the same position timm's training and Keras's SwapEMAWeights keep an average in.

See Networks.

Shaping what a network can be

A deep look at PyTorch, TensorFlow and the wider Python training ecosystem, next to what DeepSharp already had, named three shapes a network could not yet be put together as.

  • A gated feed-forward block. The encoder block's feed-forward part was a width, a bend and a width back — the same shape PyTorch's own TransformerEncoderLayer takes. A gated form, the feed-forward part the newer transformer recipes write, splits that hidden layer into a gate and a value instead: EncoderShape.Gate, one of ReGlu, GeGlu or SwiGlu, naming the bend the gate itself takes before it weighs the value. Nothing new was needed to multiply the two together: the Product join that two steps already use to multiply what they made is exactly what a gate and a value are, so the gate is a Dense and a bend — Relu, Gelu or the already-standing Silu for SwiGlu — reused rather than a fourth activation invented to carry one option's name. PyTorch's own layer has no gated form to match, so the gate and the value it weighs are found under this library's own names, linear1_gate and linear1_value, beside the names PyTorch does give the rest of the block's state.
  • Training one network on what another already answered. Not an ensemble of networks answering together, which was already here, but a BoostedNetwork: a basis trained first, and a correction trained after it, in sequence, on the basis's own frozen answer subtracted from the truth — never on the truth itself — and only on the training rows, replayed unchanged everywhere after, the same training-split-only rule the rest of the library is built on. The two answer together by their raw numbers summed once, before either comes back into the answer's own units, since the mean of two ways back is not the way back of their mean. It stood apart from the pipeline's own verbs on purpose: BoostedExtensions.TrainBoosted takes a basis and a correction the way TrainedEnsemble takes members, not a new line in the chain a pipeline declares, because what is boosted is a pair of trainings decided once, in code, not a shape every pipeline should be free to redeclare. A basis or a correction whose loss bends its raw answer — anything but the identity, Quantile among them — is refused by name: a sum of two raw answers means something only when each one's own units are the same thing summed.
  • A tabular network that answers as an ensemble of itself. BatchEnsemble, one set of weights answering as several: every row of a batch is multiplied, before the shared layers that follow it, by a different one of several learned adapters, so the shared stack runs once and answers as that many virtual members — Wen, Tran and Ba's design, the one adapter TabM-mini keeps of it. VariantHeads closes the variants again at the end, each with its own, un-shared weights, never a Dense the variants would have to share. A BatchNorm, an attention, the sine positions or a recurrent layer opened over an un-closed BatchEnsemble is refused by name: each would mix statistics, or treat the variants as a series, across virtual members that must stay apart until VariantHeads ends them; a layer or an RMS normalisation is not refused, since neither reads across rows.

A search judged by more than one number

Judge, Score, Pruner and the DealStopper built above all reduced a trial to one number. Study.Objectives gives a trial a vector instead: one value for each of several things being weighed, ValidationLoss() beside a network's own size, say, where no one trade-off alone chooses the winner. A Verdict orders two trials by the lexicographic least of their values, the first one that differs deciding it, which is what a Study.Score or a Study.Judge already was — a vector of one — so the one comparison serves both kinds of trial alike, never a branch of its own for either. EnsembleExtensions.ParetoFront() keeps every trial none of the others betters on every objective and is strictly better on at least one, rather than the single StudyResult.Best an ordinary study keeps: where two or more trade-offs are really being weighed, the front is the candidates worth choosing between, not the one a single number picked first. Resuming a study with earlier trials verifies a resumed best the same way an ordinary study's resumed best is verified — trained again, its objective vector held to what the earlier run recorded, bit for bit. Objectives is refused beside a Score, a Judge, a Pruner or a DealStopper: each of those stops or orders a trial by a number Objectives does not give, the same reason a Pruner is already refused beside a Score.

A margin per kind of row, and a correlation matrix without a pipeline

A team that weighs flocks wrote for a sixth time, asking for two small things their own code had rebuilt beside this library rather than from it.

  • A conformal margin from the caller's own errors. ConformalInterval gave one margin, worked out from the errors of a pipeline's own predictions; the rank-order rule underneath it — the ⌈(n+1)(1−α)⌉-th smallest absolute error — is now reachable directly, ConformalInterval.FromErrors(errors, alpha), on a plain list the caller built itself: a margin per group it defines, for a number it derives rather than a pipeline's own answer.
  • CorrelationMatrix.From is public. The same Pearson's and Spearman's coefficients the Correlate step already works out over a pipeline's training rows, now reachable on a plain table of columns and rows, before any pipeline exists at all.

A model trained outside DeepSharp, counted as a study's own

A Study candidate declared the networks it trained, and Study trained them itself; a TrainedEnsemble member was a network trained behind one fit of a pipeline. Both assumed training meant trained by this library's own Train. Study<TModel>(space, train) tries a function of the caller's own instead — handed a TrainingDeal (the candidate, the pipeline's rows prepared for that deal, where to report progress, and when to stop) and returning a Trained<TModel> (the score its trial is judged by, and the model it made). The sampler, the deals, a pruner heard through TrainingDeal.Heard, a deal stopper, OnTrial, and resuming an earlier run's trials all work the same way a Study of networks already does; only what trains, and the model trained, is the caller's, so Score, Judge and Objectives mean nothing here and are not offered. ModelEnsemble<TModel>, built only by Study<TModel>.TrainEnsemble, answers the way TrainedEnsemble does — several members blended in the answer's own units, measured and given an interval through the same four methods — but every member trains on the one fit it is handed, so no digest has to tie members trained apart.

A history over rows already answered

history fits on the training rows alone and replays what it learned unchanged on validation, test and live rows — a flock served alone never loses the history its key had. history.known keeps that same floor and reads, above it, every row of the same key already answered since the pipeline was fitted — validation and test rows included, because by the time a later row of a producer is asked for, an earlier one's own outcome is already known, the way it would be in production. It stands only below a split in time, ordered by the column the split itself divides by, because otherwise a training row could read a validation or a test row that merely happened to come first in that order — the same leak settle.gaps' training-only rule exists to close, run the other way. Answering this ask found that the same leak already reached two existing steps nobody had asked about: fill.missing with With.Previous could carry a value across a part the same way, and history itself could read a value target.ahead had already made from a row later than the one it stood on. Both are refused now, by name, wherever they are declared without the time split above them that keeps a leak like this from happening at all.

What is later

A deep look at PyTorch, TensorFlow and the wider Python training ecosystem, next to what DeepSharp already has, found a short, real list, worked through row by row above. Nothing stands here today — a row lands here when it is asked for, never to keep the heading filled.

What is not on this list

Hand-written GPU code

Reaching a GPU means using an engine that already does, through the seam. No CUDA is written here, and the GPU training host it would reach stays a separate project.

A second network representation

No description of a network kept beside the model and held in step with it, however convenient it would be for one feature. Two of those diverge on the first unusual model, and then every bug is asked twice.

A network that branches is not that and is done above: a step asks for what a step other than the last one made, and it does so inside the one model every engine runs and every file holds.

Nor is a file written out for another runtime to read: that is written from the model and never read back as the model.

Matching a Python API call for call

Names that are clear in C# beat names that are familiar from Python. Where the two agree, the familiar one wins; where they do not, the reader here comes first.

Clone this wiki locally