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, DLWAY 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.

    Several models in one project

    The model name beside the title lists every model in the project. Each keeps its own layers and settings. New model starts an empty one, the copy button beside a model makes a copy, and the bin deletes it (models and runs already made from it stay). What is on the canvas is saved to the model you leave, in the project it belongs to, before the next one opens, so switching never loses an edit. Models cannot be switched while one of them is training.

    Training on a version of a dataset

    Beside the dataset is a version button. By default a model trains on the dataset's current version. Pick another and it trains on exactly that version's rows, without changing the dataset or what the rest of the Studio reads. A model trained on any version other than the current one is saved as name-v2 (the version's number), so it cannot replace the model trained on the current version in a project folder, or be mistaken for it in a model list. Every run records the version it read, and a version a run was trained on is kept when old versions are cleaned up.

    Runs, and running several

    The Runs tab lists every run the project has kept, after a reload and after a visit to another project: the model, the dataset and version it read, its loss and accuracy by epoch, and how long it took. From a run you can fine-tune or deploy the model it made, open the model it came from, or Restore the design it used, which starts a new model from the layers and settings that run used, useful when the original has since been edited or deleted.

    A browser trains one model at a time. While a run is going, Queue adds another to the end: the model as drawn right now, on the dataset version chosen right now. Queued runs start one after another, and each is kept as an ordinary run. Three things to know:

    • The queue is not kept if you reload the page. Finished runs are.
    • A queued run starts only while its own project is open, and waits if you open another.
    • A run that has started keeps going if you open another project, and is saved in the project it started in.

    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.

    A graph of these blocks is one of two kinds. With a LoRA adapter and a Task head it is a script, not run in the browser: the browser runtime is shown as unavailable, 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.

    With layers of your own after the pretrained model instead, it is a head on an encoder: the Head on a text encoder template draws a Text input, a pretrained encoder, a Dense layer and an Output. The encoder is frozen; it reads each text once, in the browser, and the layers after it are trained on what it reads. It runs in the browser whatever runtime is chosen, the encoder's card says how many numbers it makes of a text, and Train reads the texts before it trains. The encoder is downloaded the first time. After the encoder, Dense, Dropout, normalization and activation layers can follow, and the last layer needs a unit for each class (a binary classifier is one sigmoid unit, as in any model). A graph is one kind or the other: an adapter or a Task head cannot be added once layers follow the encoder, and a Conv or recurrent layer cannot follow it, because it makes one vector for each text. A connection the rules refuse is not drawn, with the reason. The model it keeps is used in Deployment like one tuned in Fine-Tune. It reads up to 5,000 rows; Fine-Tune takes up to 20,000.

    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.