All documentation pages

    5 min read

    Visual Model Builder

    Design neural networks by dragging and connecting layers, with live shape inference and validation, train them in the browser, and export TensorFlow.js or Keras code.

    Designing visually

    Start from a template, or add layers one at a time (Dense, Conv2D, Embedding, Attention, and dozens more). Drag a layer from the layer rail onto the canvas, double-click it to attach it after the selected layer, or press Ctrl K (⌘K on a Mac) and type its name. The + on a connection puts a layer between two others. To connect layers yourself, drag from the port under one to the port above the next.

    The selected layer

    Select a layer to open its inspector: every setting it has, and what follows from them, which is the shape coming in and going out, the parameter count and the memory those parameters take. An Output layer picks its target from the bound dataset's columns, and choosing one sets the task type and loss that column calls for.

    Selecting, copying and pasting

    The canvas toolbar has two pointer tools. With Select (V), dragging on empty canvas draws a box and selects every layer it touches; hold Space, or use the middle mouse button, to move the canvas. With the Hand (H), dragging moves the canvas, and Shift-drag still draws a selection box. Shift-click adds a layer to the selection or takes it out, and Ctrl A selects everything. The tool you pick is remembered, and PrepFlow, Pipelines and the Data Hub's data model use the same one.

    Ctrl C copies the selected layers, with the connections between them, as JSON, in the format JSON exports. Ctrl V pastes them where the pointer is, Ctrl X cuts, and Ctrl D duplicates in place. A copy is plain text, so it can be pasted into another project, kept in a file or sent to someone, and pasting an exported model onto an empty canvas builds that model.

    Live feedback

    As you edit, DLWΛY infers tensor shapes, counts parameters and checks the graph. The status line at the bottom of the canvas says how many problems there are. The Problems tab lists them (a layer with no input, a final layer that does not match the target column, an Input that does not match the dataset's feature columns) and offers a one-click fix where there is one. Resources shows every layer's output shape, its parameters and its share of the total, so architecture mistakes surface before you train.

    Memory

    The builder estimates what a training run needs in memory: the parameters, held three times over while training (weights, gradients, optimizer state), and the activations every layer keeps for the backward pass, which grow with the batch size. It is an estimate from the layers' shapes, not a measurement. It is compared with a memory budget. A browser does not report how much memory the GPU has, so the budget starts as an assumption, half of the memory the browser reports for the device, and you can replace it with your GPU's real figure in Resources. For an attached kernel there is no budget until you enter one.

    When a run needs more than the budget, Train first shows where the memory goes and what would lower it: a narrower hidden layer, a smaller batch, a pooling layer before a Flatten. Each suggestion shows the saving this model would get, worked out by trying the change. Apply & train makes the ticked changes as one edit you can undo and starts the run; Train anyway leaves the model as it is.

    Training

    Choose a dataset and a runtime in the header and press Train. If the graph has a problem a run would trip over, the builder says so first and offers the repair. The run's output appears in the dock under the canvas, with loss and accuracy charted epoch by epoch, and Stop ends it. Training sets epochs, batch size, early stopping and checkpoints, and says in plain words what the generated code will do with them.

    What a run keeps

    Every model a run trains is kept, in the project folder when one is open and in this browser when none is, and the run records the model graph and dataset it came from. When a run ends, the top of the Run tab says what was kept and where, with three ways on: Fine-tune opens Fine-Tune with the model chosen, Deploy opens Deployment with it chosen, and the pipeline button adds it to a pipeline. From Fine-Tune or Deployment, Open its design brings back the graph the model was trained from.

    Transfer learning

    A layer that holds weights can be frozen: its Trainable setting is off, a lock shows on its card, and its weights stay exactly as they are while the model trains. In a layer's inspector, Freeze everything above here freezes it and every layer above it in one step. The parameter count then splits into trainable and frozen, and the memory estimate drops, because frozen weights have no gradient or optimizer state and nothing is learned through a frozen base.

    In Training, Start from begins a run from the weights of a model you already trained. Weights are matched to layers by name: every weighted layer is named after its node in the generated code, so a model trained from a graph matches that graph again however it has been edited. A layer that is new, or whose shape changed, starts fresh. To replace a model's head, delete the old final layers and add new ones. The dialog and the Resources tab list which layers take the weights and which start fresh, and the run says the same when it starts. Starting weights work in the browser runtime; a model trained before layers were named has no matching names, so everything starts fresh. In Fine-Tune, Tune it as a graph opens a model's design with the model already set as the starting point.

    Hugging Face models

    A pretrained transformer is not a stack of the layers above, so it has blocks of its own, in the Hugging Face group and in the Hugging Face text classifier template: a Text input (the column and the longest text), a Pretrained model (search the Hub from its settings), a LoRA adapter (rank, alpha, dropout, the layers adapted), a Task head (the task and the learning rate) and an Output that names the labels. The pretrained model is drawn as a frozen backbone; its cards show its size and what the adapter trains, worked out from the model's own configuration for the architectures where that is exact. The script prints the exact figure when it runs.

    These blocks are written as a Python script, not run in the browser: the browser runtime is shown as unavailable for such a graph, and the Code tab has the script, its requirements, the rows and a notebook for Colab, to add to the project or download. Editing a block changes the script. The blocks and the ordinary layers are separate families: ordinary layers cannot follow a pretrained model, and a connection that crosses between them is refused with the reason.

    Exporting code

    The Code tab shows the training code as it is regenerated from the graph: TensorFlow.js for the browser runtime, Keras for an attached Jupyter kernel. Click Generate Code to record it as a project file you can open in the Code Editor. That file is rewritten whenever the graph changes, so save a copy before editing it by hand. JSON exports the graph itself, to keep, share or load back.

    Tutorial

    From Template to Trained Model walks through the builder from a template to a trained, reusable model.