Practical overview
When it fits
Use it when a web project needs an interactive 3D view of a neural network or a pre-trained model’s intermediate behavior and predictions.
Who it is for
- JavaScript and front-end developers building browser-based neural-network visualizations.
- Educators and demo creators who want to present model structure, intermediate information and predictions interactively.
Documented uses
- Build an interactive 3D representation of neural-network layers.
- Load and visualize a pre-trained model after converting it to TensorSpace-compatible form.
- Show intermediate model information and final inference in a browser-based demo.
Requirements & limits
- The framework uses JavaScript with TensorFlow.js, Three.js and Tween.js; the basic browser setup also lists TrackballControls.
- Pre-trained models need TensorSpace preprocessing before visualization; the project identifies TensorSpace Converter as a conversion option.
- Installation is documented through browser build files or npm/Yarn for progressive-framework projects.
- The repository specifies the Apache-2.0 license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install TensorSpace in a progressive-framework project
Add TensorSpace as a project dependency and import its JavaScript module.
Before you start
- A progressive-framework project using npm or Yarn.
Steps
Install the package with the command below or
yarn add tensorspace.npm install tensorspaceImport it in your JavaScript code with
import * as TSP from 'tensorspace';.
Expected outcome
TensorSpace is installed and available through the `TSP` module import.
Guide limitations
- This covers installation and importing only; it does not build or render a visualization.
Visualize a preprocessed LeNet model and sample input
Create a browser-based TensorSpace visualization of the documented LeNet example and run its sample prediction.
Before you start
- TensorSpace installed and available in the page.
- A preprocessed TensorSpace-compatible LeNet model and sample input image; the documented HelloWorld resources include these.
- A TensorSpace-Converter runtime environment and the
tensorspacejsPython package are required if preprocessing the model yourself.
Steps
If needed, preprocess the model with TensorSpace Converter; for a
tf.kerasmodel, the documented conversion usestensorspacejs_converterwith the TensorFlow source,tf_kerasformat, selected output layer names, input model path, and save directory.Create a model with
new TSP.models.Sequential(document.getElementById("container")).Add the LeNet layers in order:
GreyscaleInput,Padding2d,Conv2d,Pooling2d,Conv2d,Pooling2d, twoDenselayers, andOutput1dwith outputs0through9.Load the compatible model with
model.load({ type: "tensorflow", url: './PATH/TO/MODEL/model.json' })and callmodel.init(...).After initialization, call
model.predict(image_5)in the initialization callback to display the sample prediction.
Expected outcome
The browser displays the LeNet model, with the sample image prediction after initialization.
Guide limitations
- The model must be preprocessed into TensorSpace-compatible format before loading.
- The paths, container, and
image_5must be supplied by the application; the guide does not provide their actual values. - The documented example uses a preprocessed LeNet model and sample input, not an arbitrary model or input.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| TensorSpace.js | Build an interactive 3D representation of neural-network layers. | Web | |
| Hyperpose | Customize pose-estimation architectures and datasets. | Docker, Linux, macOS, Windows | |
| Multi Task Nlp | Define multiple tasks and their data and model settings in a YAML file. | Linux, macOS, Windows | The project is an open-source library under the Apache-2.0 license, distributed through its public GitHub repository. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- tensorspace-team/tensorspace · Official homepage title · retained in its source language

