tensorstudio 1.8.0__tar.gz → 1.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/CHANGELOG.md +35 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/CMakeLists.txt +70 -70
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/PKG-INFO +80 -30
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/README.md +77 -29
- tensorstudio-1.10.0/benchmarks/results.md +347 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/results_matmul.md +13 -13
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/autograd/coverage.md +1 -1
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/core/api-reference.md +26 -5
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/core/tensors.md +2 -0
- tensorstudio-1.10.0/docs/data/dataset-creation.md +91 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/data/datasets-and-dataloaders.md +29 -2
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/hardware/cpu-backend.md +1 -1
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/index.md +20 -13
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/interchange/onnx.md +1 -1
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/interchange/serialization.md +1 -1
- tensorstudio-1.10.0/docs/nn/initializers.md +70 -0
- tensorstudio-1.10.0/docs/nn/losses-and-summary.md +79 -0
- tensorstudio-1.10.0/docs/nn/modules.md +213 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/nn/overview.md +42 -3
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/nn/training.md +1 -1
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/project/checkpoints.md +23 -6
- tensorstudio-1.10.0/docs/project/configs-and-templates.md +76 -0
- tensorstudio-1.10.0/docs/project/metrics.md +62 -0
- tensorstudio-1.10.0/docs/project/trainer-and-callbacks.md +91 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/project/workflows.md +32 -14
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/release/publishing.md +4 -4
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/release/versioning.md +2 -2
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/roadmap/milestones.md +19 -3
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/roadmap/priorities.md +1 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/roadmap/roadmap.md +23 -17
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/ops.hpp +16 -1
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/version.hpp +7 -7
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/mkdocs.yml +6 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/pyproject.toml +94 -92
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/_C.pyi +16 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/__init__.py +6 -1
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/_version.py +5 -5
- tensorstudio-1.10.0/python/tensorstudio/data/__init__.py +21 -0
- tensorstudio-1.10.0/python/tensorstudio/data/dataset.py +116 -0
- tensorstudio-1.10.0/python/tensorstudio/data/factories.py +34 -0
- tensorstudio-1.10.0/python/tensorstudio/data/splitting.py +35 -0
- tensorstudio-1.10.0/python/tensorstudio/metrics/__init__.py +25 -0
- tensorstudio-1.10.0/python/tensorstudio/metrics/classification.py +85 -0
- tensorstudio-1.10.0/python/tensorstudio/metrics/multilabel.py +46 -0
- tensorstudio-1.10.0/python/tensorstudio/metrics/regression.py +41 -0
- tensorstudio-1.10.0/python/tensorstudio/nn/__init__.py +170 -0
- tensorstudio-1.10.0/python/tensorstudio/nn/functional.py +500 -0
- tensorstudio-1.10.0/python/tensorstudio/nn/init.py +118 -0
- tensorstudio-1.10.0/python/tensorstudio/nn/losses.py +169 -0
- tensorstudio-1.10.0/python/tensorstudio/nn/modules.py +999 -0
- tensorstudio-1.10.0/python/tensorstudio/nn/summary.py +109 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/ops.py +42 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/project/__init__.py +17 -1
- tensorstudio-1.10.0/python/tensorstudio/project/callbacks.py +158 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/project/checkpoint.py +40 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/project/config.py +33 -3
- tensorstudio-1.10.0/python/tensorstudio/project/seed.py +23 -0
- tensorstudio-1.10.0/python/tensorstudio/project/templates.py +79 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/project/trainer.py +34 -5
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/bindings/bind_ops.cpp +50 -3
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/ops.cpp +502 -26
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_import.py +13 -13
- tensorstudio-1.10.0/tests/test_nn_building_blocks.py +205 -0
- tensorstudio-1.10.0/tests/test_training_workflows.py +177 -0
- tensorstudio-1.8.0/benchmarks/results.md +0 -347
- tensorstudio-1.8.0/docs/nn/modules.md +0 -141
- tensorstudio-1.8.0/python/tensorstudio/data/__init__.py +0 -8
- tensorstudio-1.8.0/python/tensorstudio/data/dataset.py +0 -36
- tensorstudio-1.8.0/python/tensorstudio/nn/__init__.py +0 -82
- tensorstudio-1.8.0/python/tensorstudio/nn/functional.py +0 -166
- tensorstudio-1.8.0/python/tensorstudio/nn/losses.py +0 -73
- tensorstudio-1.8.0/python/tensorstudio/nn/modules.py +0 -511
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/.gitattributes +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/.github/workflows/ci.yml +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/.github/workflows/publish-testpypi.yml +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/.github/workflows/publish.yml +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/.github/workflows/wheels.yml +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/.gitignore +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/.pre-commit-config.yaml +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/CONTRIBUTING.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/LICENSE +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/SECURITY.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmark_all.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/__init__.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_activations.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_autograd.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_conv2d.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_elementwise.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_matmul.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_pooling.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_reductions.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_tensor_ops.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/bench_training_loop.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/benchmark_report.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/results_conv2d.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/results_pooling.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/results_reductions.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/results_tensor_ops.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/benchmarks/thresholds.json +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/autograd/gradient-notes.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/autograd/overview.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/core/broadcasting.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/core/math-and-statistics.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/core/native-cpp-core.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/data/dataloader-patterns.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/data/tensor-datasets.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/development/contributing.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/development/cpp-first.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/getting-started/installation.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/getting-started/quickstart.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/getting-started/source-build.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/hardware/linux.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/hardware/macos.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/hardware/windows.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/interchange/model-formats.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/interchange/numpy-interop.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/interchange/trusted-serialization.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/nn/optimizers.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/performance/benchmarks.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/performance/optimization.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/performance/profiling.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/project/project-layout.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/release/checklist.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/vision/dataset-creation.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/docs/vision/overview.md +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/basic_tensor_ops.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/export_onnx.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/image_folder_classification.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/linear_regression.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/project_training.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/save_load_model.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/tiny_mlp.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/examples/vision_classifier.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/autograd.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/device.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/dtype.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/errors.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/module.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/optim.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/perf.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/random.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/serialization.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/shape.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/storage.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/include/tensorstudio/tensor.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/autograd.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/data/dataloader.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/dtypes.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/errors.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/grad_mode.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/interchange/__init__.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/interchange/onnx.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/math.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/optim/__init__.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/optim/adam.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/optim/adamw.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/optim/lr_scheduler.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/optim/sgd.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/optim/utils.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/performance.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/py.typed +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/serialization.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/tensor.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/typing.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/vision/__init__.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/vision/datasets.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/vision/io.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/vision/metrics.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/vision/models.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/vision/transforms.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/python/tensorstudio/vision/visualization.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/bindings/bind_autograd.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/bindings/bind_nn.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/bindings/bind_optim.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/bindings/bind_tensor.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/bindings/bindings.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/bindings/bindings.hpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/autograd.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/device.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/dtype.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/errors.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/module.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/optim.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/perf.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/random.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/serialization.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/shape.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/storage.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/src/core/tensor.cpp +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/test_all.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_autograd.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_autograd_hardening.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_benchmark_report.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_broadcasting.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_core_math_expansion.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_data.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_errors.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_indexing.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_interchange.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_nn.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_numpy_interop.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_ops.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_optim.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_performance.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_project.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_serialization.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_tensor.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_views.py +0 -0
- {tensorstudio-1.8.0 → tensorstudio-1.10.0}/tests/test_vision.py +0 -0
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.10.0 - 2026-07-07
|
|
6
|
+
|
|
7
|
+
- Completed the ordered Training And Project Workflows roadmap section as one
|
|
8
|
+
release batch.
|
|
9
|
+
- Added `ArrayDataset`, tensor/array/image-folder dataset factories,
|
|
10
|
+
deterministic train/validation splitting, and dataset metadata summaries.
|
|
11
|
+
- Added `tensorstudio.metrics` with regression, classification, and multilabel
|
|
12
|
+
metrics for small supervised workflows.
|
|
13
|
+
- Added trainer validation loops, scheduler stepping, callback context support,
|
|
14
|
+
learning-rate logging, CSV logging, checkpoint callbacks, and early stopping.
|
|
15
|
+
- Added JSON, TOML, and YAML project config loading plus deterministic seeding
|
|
16
|
+
across TensorStudio, NumPy, and Python random.
|
|
17
|
+
- Expanded full checkpoints with scheduler and epoch state and added
|
|
18
|
+
`resume_checkpoint()` for continuing training runs.
|
|
19
|
+
- Added generated regression, classification, and vision project templates.
|
|
20
|
+
- Expanded tests and docs for project workflows, metrics, dataset creation,
|
|
21
|
+
callbacks, configs, templates, and checkpoint resume.
|
|
22
|
+
|
|
23
|
+
## 1.9.0 - 2026-07-07
|
|
24
|
+
|
|
25
|
+
- Completed the ordered Neural Network Building Blocks roadmap section as one
|
|
26
|
+
release batch.
|
|
27
|
+
- Added native grouped `conv2d`, native `conv_transpose2d`, and native
|
|
28
|
+
embedding lookup with autograd support.
|
|
29
|
+
- Added Python-level `Conv1d`, `DepthwiseConv2d`, `ConvTranspose2d`,
|
|
30
|
+
`BatchNorm1d`, `BatchNorm2d`, `LayerNorm`, `Embedding`,
|
|
31
|
+
adaptive/global pooling, and additional activation modules.
|
|
32
|
+
- Added `tensorstudio.nn.init` with Xavier, Kaiming, normal, uniform, zero, and
|
|
33
|
+
one initializers.
|
|
34
|
+
- Added label-smoothing cross entropy, focal loss, KL divergence, negative log
|
|
35
|
+
likelihood, and cosine embedding loss modules and functional helpers.
|
|
36
|
+
- Added module buffers, buffer-aware `state_dict()` support, and model summary
|
|
37
|
+
utilities for parameters, shapes, and estimated tensor memory.
|
|
38
|
+
- Expanded tests and docs for the section-5 neural-network API surface.
|
|
39
|
+
|
|
5
40
|
## 1.8.0 - 2026-07-07
|
|
6
41
|
|
|
7
42
|
- Completed the ordered Autograd Coverage And Hardening roadmap section as one
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 3.18)
|
|
2
|
-
|
|
3
|
-
project(tensorstudio VERSION 1.
|
|
4
|
-
|
|
5
|
-
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
|
|
6
|
-
set(PYBIND11_FINDPYTHON ON)
|
|
7
|
-
find_package(pybind11 CONFIG REQUIRED)
|
|
8
|
-
|
|
9
|
-
option(TENSORSTUDIO_ENABLE_BLAS "Enable optional CBLAS-backed matmul when available" ON)
|
|
10
|
-
|
|
11
|
-
set(TENSORSTUDIO_CORE_SOURCES
|
|
12
|
-
src/core/tensor.cpp
|
|
13
|
-
src/core/dtype.cpp
|
|
14
|
-
src/core/shape.cpp
|
|
15
|
-
src/core/device.cpp
|
|
16
|
-
src/core/storage.cpp
|
|
17
|
-
src/core/ops.cpp
|
|
18
|
-
src/core/autograd.cpp
|
|
19
|
-
src/core/module.cpp
|
|
20
|
-
src/core/optim.cpp
|
|
21
|
-
src/core/random.cpp
|
|
22
|
-
src/core/serialization.cpp
|
|
23
|
-
src/core/errors.cpp
|
|
24
|
-
src/core/perf.cpp
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
set(TENSORSTUDIO_BINDING_SOURCES
|
|
28
|
-
src/bindings/bindings.cpp
|
|
29
|
-
src/bindings/bind_tensor.cpp
|
|
30
|
-
src/bindings/bind_ops.cpp
|
|
31
|
-
src/bindings/bind_autograd.cpp
|
|
32
|
-
src/bindings/bind_nn.cpp
|
|
33
|
-
src/bindings/bind_optim.cpp
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
pybind11_add_module(_C MODULE
|
|
37
|
-
${TENSORSTUDIO_CORE_SOURCES}
|
|
38
|
-
${TENSORSTUDIO_BINDING_SOURCES}
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
target_include_directories(_C PRIVATE include src/bindings)
|
|
42
|
-
target_compile_features(_C PRIVATE cxx_std_20)
|
|
43
|
-
|
|
44
|
-
if(TENSORSTUDIO_ENABLE_BLAS)
|
|
45
|
-
find_package(BLAS)
|
|
46
|
-
if(BLAS_FOUND)
|
|
47
|
-
include(CheckIncludeFileCXX)
|
|
48
|
-
check_include_file_cxx(cblas.h TENSORSTUDIO_HAVE_CBLAS_H)
|
|
49
|
-
target_link_libraries(_C PRIVATE ${BLAS_LIBRARIES})
|
|
50
|
-
if(APPLE)
|
|
51
|
-
target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_ACCELERATE=1)
|
|
52
|
-
elseif(TENSORSTUDIO_HAVE_CBLAS_H)
|
|
53
|
-
target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_CBLAS=1)
|
|
54
|
-
endif()
|
|
55
|
-
endif()
|
|
56
|
-
endif()
|
|
57
|
-
|
|
58
|
-
if(MSVC)
|
|
59
|
-
target_compile_options(_C PRIVATE /W4 /permissive-)
|
|
60
|
-
else()
|
|
61
|
-
target_compile_options(_C PRIVATE -Wall -Wextra -Wpedantic)
|
|
62
|
-
endif()
|
|
63
|
-
|
|
64
|
-
target_compile_definitions(_C PRIVATE TENSORSTUDIO_VERSION="${PROJECT_VERSION}")
|
|
65
|
-
|
|
66
|
-
install(TARGETS _C
|
|
67
|
-
LIBRARY DESTINATION tensorstudio
|
|
68
|
-
RUNTIME DESTINATION tensorstudio
|
|
69
|
-
ARCHIVE DESTINATION tensorstudio
|
|
70
|
-
)
|
|
1
|
+
cmake_minimum_required(VERSION 3.18)
|
|
2
|
+
|
|
3
|
+
project(tensorstudio VERSION 1.10.0 LANGUAGES CXX)
|
|
4
|
+
|
|
5
|
+
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
|
|
6
|
+
set(PYBIND11_FINDPYTHON ON)
|
|
7
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
8
|
+
|
|
9
|
+
option(TENSORSTUDIO_ENABLE_BLAS "Enable optional CBLAS-backed matmul when available" ON)
|
|
10
|
+
|
|
11
|
+
set(TENSORSTUDIO_CORE_SOURCES
|
|
12
|
+
src/core/tensor.cpp
|
|
13
|
+
src/core/dtype.cpp
|
|
14
|
+
src/core/shape.cpp
|
|
15
|
+
src/core/device.cpp
|
|
16
|
+
src/core/storage.cpp
|
|
17
|
+
src/core/ops.cpp
|
|
18
|
+
src/core/autograd.cpp
|
|
19
|
+
src/core/module.cpp
|
|
20
|
+
src/core/optim.cpp
|
|
21
|
+
src/core/random.cpp
|
|
22
|
+
src/core/serialization.cpp
|
|
23
|
+
src/core/errors.cpp
|
|
24
|
+
src/core/perf.cpp
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
set(TENSORSTUDIO_BINDING_SOURCES
|
|
28
|
+
src/bindings/bindings.cpp
|
|
29
|
+
src/bindings/bind_tensor.cpp
|
|
30
|
+
src/bindings/bind_ops.cpp
|
|
31
|
+
src/bindings/bind_autograd.cpp
|
|
32
|
+
src/bindings/bind_nn.cpp
|
|
33
|
+
src/bindings/bind_optim.cpp
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
pybind11_add_module(_C MODULE
|
|
37
|
+
${TENSORSTUDIO_CORE_SOURCES}
|
|
38
|
+
${TENSORSTUDIO_BINDING_SOURCES}
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
target_include_directories(_C PRIVATE include src/bindings)
|
|
42
|
+
target_compile_features(_C PRIVATE cxx_std_20)
|
|
43
|
+
|
|
44
|
+
if(TENSORSTUDIO_ENABLE_BLAS)
|
|
45
|
+
find_package(BLAS)
|
|
46
|
+
if(BLAS_FOUND)
|
|
47
|
+
include(CheckIncludeFileCXX)
|
|
48
|
+
check_include_file_cxx(cblas.h TENSORSTUDIO_HAVE_CBLAS_H)
|
|
49
|
+
target_link_libraries(_C PRIVATE ${BLAS_LIBRARIES})
|
|
50
|
+
if(APPLE)
|
|
51
|
+
target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_ACCELERATE=1)
|
|
52
|
+
elseif(TENSORSTUDIO_HAVE_CBLAS_H)
|
|
53
|
+
target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_CBLAS=1)
|
|
54
|
+
endif()
|
|
55
|
+
endif()
|
|
56
|
+
endif()
|
|
57
|
+
|
|
58
|
+
if(MSVC)
|
|
59
|
+
target_compile_options(_C PRIVATE /W4 /permissive-)
|
|
60
|
+
else()
|
|
61
|
+
target_compile_options(_C PRIVATE -Wall -Wextra -Wpedantic)
|
|
62
|
+
endif()
|
|
63
|
+
|
|
64
|
+
target_compile_definitions(_C PRIVATE TENSORSTUDIO_VERSION="${PROJECT_VERSION}")
|
|
65
|
+
|
|
66
|
+
install(TARGETS _C
|
|
67
|
+
LIBRARY DESTINATION tensorstudio
|
|
68
|
+
RUNTIME DESTINATION tensorstudio
|
|
69
|
+
ARCHIVE DESTINATION tensorstudio
|
|
70
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tensorstudio
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.10.0
|
|
4
4
|
Summary: TensorStudio is a compact C++ tensor and autograd engine with a Python API for learning, experimentation, and lightweight ML workloads.
|
|
5
5
|
Keywords: tensor,autograd,machine-learning,cpp,pybind11
|
|
6
6
|
Author: TensorStudio contributors
|
|
@@ -42,6 +42,8 @@ Project-URL: Repository, https://github.com/imattas/TensorStudio
|
|
|
42
42
|
Project-URL: Issues, https://github.com/imattas/TensorStudio/issues
|
|
43
43
|
Requires-Python: >=3.10
|
|
44
44
|
Requires-Dist: numpy>=1.24
|
|
45
|
+
Requires-Dist: PyYAML>=6
|
|
46
|
+
Requires-Dist: tomli>=2.0; python_version < "3.11"
|
|
45
47
|
Provides-Extra: dev
|
|
46
48
|
Requires-Dist: pytest>=8; extra == "dev"
|
|
47
49
|
Requires-Dist: pytest-cov>=5; extra == "dev"
|
|
@@ -71,13 +73,18 @@ Description-Content-Type: text/markdown
|
|
|
71
73
|
TensorStudio is a compact C++ tensor and autograd engine with a Python API for
|
|
72
74
|
learning, experimentation, and lightweight ML workloads.
|
|
73
75
|
|
|
74
|
-
TensorStudio `1.
|
|
76
|
+
TensorStudio `1.10.0` is a CPU-only stable API foundation with native C++
|
|
75
77
|
threading, storage reuse, SIMD-friendly typed kernels, and optional
|
|
76
78
|
CBLAS/Accelerate matrix multiplication when available. It adds native stable
|
|
77
79
|
softmax/logsumexp, batched matrix multiplication, statistical reductions,
|
|
78
80
|
boolean reductions, seeded random distributions, and a hardened eager autograd
|
|
79
|
-
lifecycle.
|
|
80
|
-
|
|
81
|
+
lifecycle. The neural-network layer now includes grouped/depthwise/1D/
|
|
82
|
+
transposed convolution, normalization layers, embeddings, richer activations,
|
|
83
|
+
initializers, additional losses, and model summaries. The project layer adds
|
|
84
|
+
dataset factories, deterministic train/validation splitting, metrics, callbacks,
|
|
85
|
+
multi-format configs, checkpoint resume helpers, and starter project templates.
|
|
86
|
+
It is eager-only, intentionally compact, and not a replacement for mature ML
|
|
87
|
+
frameworks.
|
|
81
88
|
|
|
82
89
|
## Install
|
|
83
90
|
|
|
@@ -287,6 +294,23 @@ print(model.state_dict().keys())
|
|
|
287
294
|
print(model.parameter_count())
|
|
288
295
|
```
|
|
289
296
|
|
|
297
|
+
The neural-network surface also includes initialization helpers,
|
|
298
|
+
normalization layers, embeddings, grouped/depthwise/1D/transposed convolution,
|
|
299
|
+
adaptive/global pooling, richer activations, and model summaries:
|
|
300
|
+
|
|
301
|
+
```python
|
|
302
|
+
model = nn.Sequential(
|
|
303
|
+
nn.Conv2d(1, 8, kernel_size=3, padding=1),
|
|
304
|
+
nn.BatchNorm2d(8),
|
|
305
|
+
nn.GELU(),
|
|
306
|
+
nn.GlobalAvgPool2d(),
|
|
307
|
+
nn.Flatten(),
|
|
308
|
+
nn.Linear(8, 10),
|
|
309
|
+
)
|
|
310
|
+
nn.init.kaiming_uniform_(model[0].weight, nonlinearity="relu", seed=7)
|
|
311
|
+
print(nn.summary(model, input_shape=(1, 1, 28, 28))["total_parameters"])
|
|
312
|
+
```
|
|
313
|
+
|
|
290
314
|
## Vision
|
|
291
315
|
|
|
292
316
|
TensorStudio includes a practical computer-vision namespace for local image
|
|
@@ -321,17 +345,22 @@ optimizer.step()
|
|
|
321
345
|
print(ts.vision.accuracy(model(x), target))
|
|
322
346
|
```
|
|
323
347
|
|
|
324
|
-
##
|
|
348
|
+
## Data And Metrics
|
|
325
349
|
|
|
326
350
|
```python
|
|
327
351
|
import tensorstudio as ts
|
|
328
|
-
from tensorstudio.data import DataLoader,
|
|
352
|
+
from tensorstudio.data import DataLoader, from_arrays, train_val_split
|
|
329
353
|
|
|
330
|
-
dataset =
|
|
331
|
-
|
|
354
|
+
dataset = from_arrays([[0.0], [1.0], [2.0], [3.0]], [[1.0], [3.0], [5.0], [7.0]])
|
|
355
|
+
train_data, val_data = train_val_split(dataset, val_fraction=0.25, seed=42)
|
|
356
|
+
loader = DataLoader(train_data, batch_size=2, shuffle=True, seed=42)
|
|
332
357
|
|
|
333
358
|
for features, targets in loader:
|
|
334
359
|
print(features.shape, targets.shape)
|
|
360
|
+
|
|
361
|
+
prediction = ts.tensor([[0.2, 0.8], [0.7, 0.3]])
|
|
362
|
+
target = ts.tensor([1, 0], dtype="int64")
|
|
363
|
+
print(ts.metrics.accuracy(prediction, target))
|
|
335
364
|
```
|
|
336
365
|
|
|
337
366
|
The v1 DataLoader is intentionally single-process so it works cleanly on
|
|
@@ -339,24 +368,44 @@ Windows without multiprocessing setup.
|
|
|
339
368
|
|
|
340
369
|
## Projects And Training
|
|
341
370
|
|
|
342
|
-
`tensorstudio.project` provides project folders, JSON config
|
|
343
|
-
|
|
371
|
+
`tensorstudio.project` provides project folders, JSON/TOML/YAML config loading,
|
|
372
|
+
deterministic seeding, reusable trainers, validation loops, callbacks, safe NPZ
|
|
373
|
+
weight files, trusted full checkpoints, and generated starter templates:
|
|
344
374
|
|
|
345
375
|
```python
|
|
346
376
|
import tensorstudio as ts
|
|
347
377
|
from tensorstudio import nn, optim
|
|
348
|
-
from tensorstudio.data import DataLoader,
|
|
349
|
-
from tensorstudio.project import
|
|
378
|
+
from tensorstudio.data import DataLoader, from_arrays, train_val_split
|
|
379
|
+
from tensorstudio.project import (
|
|
380
|
+
CSVLogger,
|
|
381
|
+
CheckpointCallback,
|
|
382
|
+
LrLogger,
|
|
383
|
+
Project,
|
|
384
|
+
ProjectConfig,
|
|
385
|
+
Trainer,
|
|
386
|
+
save_state_dict,
|
|
387
|
+
seed_everything,
|
|
388
|
+
)
|
|
350
389
|
|
|
351
|
-
|
|
352
|
-
|
|
390
|
+
seed_everything(7)
|
|
391
|
+
dataset = from_arrays([[0.0], [1.0], [2.0], [3.0]], [[1.0], [3.0], [5.0], [7.0]])
|
|
392
|
+
train_data, val_data = train_val_split(dataset, val_fraction=0.25, seed=7)
|
|
353
393
|
|
|
354
394
|
model = nn.Linear(1, 1)
|
|
355
|
-
|
|
356
|
-
trainer = Trainer(model,
|
|
395
|
+
optimizer = optim.SGD(model.parameters(), lr=0.05)
|
|
396
|
+
trainer = Trainer(model, optimizer, nn.MSELoss(), metric_fn=ts.metrics.mean_squared_error)
|
|
357
397
|
project = Project("runs/linear", ProjectConfig(name="linear-regression", seed=7))
|
|
358
398
|
|
|
359
|
-
history = trainer.fit(
|
|
399
|
+
history = trainer.fit(
|
|
400
|
+
DataLoader(train_data, batch_size=2),
|
|
401
|
+
epochs=50,
|
|
402
|
+
validation_loader=DataLoader(val_data, batch_size=1),
|
|
403
|
+
callbacks=[
|
|
404
|
+
LrLogger(),
|
|
405
|
+
CSVLogger(project.logs_dir / "history.csv"),
|
|
406
|
+
CheckpointCallback(project.checkpoints_dir / "best.tsmodel", save_best_only=True),
|
|
407
|
+
],
|
|
408
|
+
)
|
|
360
409
|
save_state_dict(model, project.checkpoint_path("weights"))
|
|
361
410
|
print(history.last)
|
|
362
411
|
```
|
|
@@ -391,11 +440,11 @@ Run the loose local regression thresholds with:
|
|
|
391
440
|
python benchmark_all.py --check-thresholds
|
|
392
441
|
```
|
|
393
442
|
|
|
394
|
-
On one Windows CPython 3.10 development run reporting `1.
|
|
443
|
+
On one Windows CPython 3.10 development run reporting `1.10.0`, with
|
|
395
444
|
TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
|
|
396
445
|
reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
|
|
397
446
|
benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
|
|
398
|
-
available on that machine; TensorStudio won
|
|
447
|
+
available on that machine; TensorStudio won 38 local cases and lost 60. The
|
|
399
448
|
strongest local wins were the simple NumPy convolution/pooling reference loops
|
|
400
449
|
and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
|
|
401
450
|
many elementwise, reduction, matrix multiplication, larger activation, and
|
|
@@ -407,15 +456,15 @@ Snapshot from that local run:
|
|
|
407
456
|
|
|
408
457
|
| operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
|
|
409
458
|
|---|---:|---:|---:|---:|---:|---:|
|
|
410
|
-
| `sigmoid` | `(32,)` | 0.
|
|
411
|
-
| `mean` | `(32,)` | 0.
|
|
412
|
-
| `sum_axis1` | `(16, 16)` | 0.
|
|
413
|
-
| `chain_relu` | `(128,)` | 0.
|
|
414
|
-
| `matmul` | `(256, 256)` | 2.
|
|
415
|
-
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.
|
|
416
|
-
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
417
|
-
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
418
|
-
| `elementwise_backward` | `(1024,)` | 2.
|
|
459
|
+
| `sigmoid` | `(32,)` | 0.0150 ms | 0.0046 ms | 0.0723 ms | 0.3056x | 4.8092x |
|
|
460
|
+
| `mean` | `(32,)` | 0.0154 ms | 0.0078 ms | 0.0111 ms | 0.5097x | 0.7198x |
|
|
461
|
+
| `sum_axis1` | `(16, 16)` | 0.0159 ms | 0.0030 ms | 0.0129 ms | 0.1904x | 0.8133x |
|
|
462
|
+
| `chain_relu` | `(128,)` | 0.0859 ms | 0.0056 ms | 0.0888 ms | 0.0647x | 1.0337x |
|
|
463
|
+
| `matmul` | `(256, 256)` | 2.0731 ms | 0.4017 ms | 0.2497 ms | 0.1938x | 0.1204x |
|
|
464
|
+
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.2028 ms | 1.3615 ms | 0.1219 ms | 6.7128x | 0.6012x |
|
|
465
|
+
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0279 ms | 0.1740 ms | n/a | 6.2464x | n/a |
|
|
466
|
+
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0275 ms | 0.5906 ms | n/a | 21.4893x | n/a |
|
|
467
|
+
| `elementwise_backward` | `(1024,)` | 2.7546 ms | n/a | n/a | n/a | n/a |
|
|
419
468
|
|
|
420
469
|
Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
|
|
421
470
|
favor TensorStudio.
|
|
@@ -516,8 +565,9 @@ tokens or print secrets.
|
|
|
516
565
|
exposing a compatible CBLAS/Accelerate interface; otherwise TensorStudio uses
|
|
517
566
|
a portable C++ fallback.
|
|
518
567
|
- No graph compiler or distributed runtime.
|
|
519
|
-
- Convolution and pooling support are
|
|
520
|
-
`conv2d`, `
|
|
568
|
+
- Convolution and pooling support are CPU-only. Native kernels include NCHW
|
|
569
|
+
`conv2d`, grouped/depthwise convolution, `conv_transpose2d`, `max_pool2d`,
|
|
570
|
+
`avg_pool2d`, and embedding lookup; they are not CUDA/cuDNN replacements.
|
|
521
571
|
- Vision covers local image-classification utilities, metrics, visualization,
|
|
522
572
|
and compact CNNs. It is not an OpenCV replacement and does not include
|
|
523
573
|
pretrained model zoos, detection/segmentation training stacks, video IO, or
|
|
@@ -7,13 +7,18 @@
|
|
|
7
7
|
TensorStudio is a compact C++ tensor and autograd engine with a Python API for
|
|
8
8
|
learning, experimentation, and lightweight ML workloads.
|
|
9
9
|
|
|
10
|
-
TensorStudio `1.
|
|
10
|
+
TensorStudio `1.10.0` is a CPU-only stable API foundation with native C++
|
|
11
11
|
threading, storage reuse, SIMD-friendly typed kernels, and optional
|
|
12
12
|
CBLAS/Accelerate matrix multiplication when available. It adds native stable
|
|
13
13
|
softmax/logsumexp, batched matrix multiplication, statistical reductions,
|
|
14
14
|
boolean reductions, seeded random distributions, and a hardened eager autograd
|
|
15
|
-
lifecycle.
|
|
16
|
-
|
|
15
|
+
lifecycle. The neural-network layer now includes grouped/depthwise/1D/
|
|
16
|
+
transposed convolution, normalization layers, embeddings, richer activations,
|
|
17
|
+
initializers, additional losses, and model summaries. The project layer adds
|
|
18
|
+
dataset factories, deterministic train/validation splitting, metrics, callbacks,
|
|
19
|
+
multi-format configs, checkpoint resume helpers, and starter project templates.
|
|
20
|
+
It is eager-only, intentionally compact, and not a replacement for mature ML
|
|
21
|
+
frameworks.
|
|
17
22
|
|
|
18
23
|
## Install
|
|
19
24
|
|
|
@@ -223,6 +228,23 @@ print(model.state_dict().keys())
|
|
|
223
228
|
print(model.parameter_count())
|
|
224
229
|
```
|
|
225
230
|
|
|
231
|
+
The neural-network surface also includes initialization helpers,
|
|
232
|
+
normalization layers, embeddings, grouped/depthwise/1D/transposed convolution,
|
|
233
|
+
adaptive/global pooling, richer activations, and model summaries:
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
model = nn.Sequential(
|
|
237
|
+
nn.Conv2d(1, 8, kernel_size=3, padding=1),
|
|
238
|
+
nn.BatchNorm2d(8),
|
|
239
|
+
nn.GELU(),
|
|
240
|
+
nn.GlobalAvgPool2d(),
|
|
241
|
+
nn.Flatten(),
|
|
242
|
+
nn.Linear(8, 10),
|
|
243
|
+
)
|
|
244
|
+
nn.init.kaiming_uniform_(model[0].weight, nonlinearity="relu", seed=7)
|
|
245
|
+
print(nn.summary(model, input_shape=(1, 1, 28, 28))["total_parameters"])
|
|
246
|
+
```
|
|
247
|
+
|
|
226
248
|
## Vision
|
|
227
249
|
|
|
228
250
|
TensorStudio includes a practical computer-vision namespace for local image
|
|
@@ -257,17 +279,22 @@ optimizer.step()
|
|
|
257
279
|
print(ts.vision.accuracy(model(x), target))
|
|
258
280
|
```
|
|
259
281
|
|
|
260
|
-
##
|
|
282
|
+
## Data And Metrics
|
|
261
283
|
|
|
262
284
|
```python
|
|
263
285
|
import tensorstudio as ts
|
|
264
|
-
from tensorstudio.data import DataLoader,
|
|
286
|
+
from tensorstudio.data import DataLoader, from_arrays, train_val_split
|
|
265
287
|
|
|
266
|
-
dataset =
|
|
267
|
-
|
|
288
|
+
dataset = from_arrays([[0.0], [1.0], [2.0], [3.0]], [[1.0], [3.0], [5.0], [7.0]])
|
|
289
|
+
train_data, val_data = train_val_split(dataset, val_fraction=0.25, seed=42)
|
|
290
|
+
loader = DataLoader(train_data, batch_size=2, shuffle=True, seed=42)
|
|
268
291
|
|
|
269
292
|
for features, targets in loader:
|
|
270
293
|
print(features.shape, targets.shape)
|
|
294
|
+
|
|
295
|
+
prediction = ts.tensor([[0.2, 0.8], [0.7, 0.3]])
|
|
296
|
+
target = ts.tensor([1, 0], dtype="int64")
|
|
297
|
+
print(ts.metrics.accuracy(prediction, target))
|
|
271
298
|
```
|
|
272
299
|
|
|
273
300
|
The v1 DataLoader is intentionally single-process so it works cleanly on
|
|
@@ -275,24 +302,44 @@ Windows without multiprocessing setup.
|
|
|
275
302
|
|
|
276
303
|
## Projects And Training
|
|
277
304
|
|
|
278
|
-
`tensorstudio.project` provides project folders, JSON config
|
|
279
|
-
|
|
305
|
+
`tensorstudio.project` provides project folders, JSON/TOML/YAML config loading,
|
|
306
|
+
deterministic seeding, reusable trainers, validation loops, callbacks, safe NPZ
|
|
307
|
+
weight files, trusted full checkpoints, and generated starter templates:
|
|
280
308
|
|
|
281
309
|
```python
|
|
282
310
|
import tensorstudio as ts
|
|
283
311
|
from tensorstudio import nn, optim
|
|
284
|
-
from tensorstudio.data import DataLoader,
|
|
285
|
-
from tensorstudio.project import
|
|
312
|
+
from tensorstudio.data import DataLoader, from_arrays, train_val_split
|
|
313
|
+
from tensorstudio.project import (
|
|
314
|
+
CSVLogger,
|
|
315
|
+
CheckpointCallback,
|
|
316
|
+
LrLogger,
|
|
317
|
+
Project,
|
|
318
|
+
ProjectConfig,
|
|
319
|
+
Trainer,
|
|
320
|
+
save_state_dict,
|
|
321
|
+
seed_everything,
|
|
322
|
+
)
|
|
286
323
|
|
|
287
|
-
|
|
288
|
-
|
|
324
|
+
seed_everything(7)
|
|
325
|
+
dataset = from_arrays([[0.0], [1.0], [2.0], [3.0]], [[1.0], [3.0], [5.0], [7.0]])
|
|
326
|
+
train_data, val_data = train_val_split(dataset, val_fraction=0.25, seed=7)
|
|
289
327
|
|
|
290
328
|
model = nn.Linear(1, 1)
|
|
291
|
-
|
|
292
|
-
trainer = Trainer(model,
|
|
329
|
+
optimizer = optim.SGD(model.parameters(), lr=0.05)
|
|
330
|
+
trainer = Trainer(model, optimizer, nn.MSELoss(), metric_fn=ts.metrics.mean_squared_error)
|
|
293
331
|
project = Project("runs/linear", ProjectConfig(name="linear-regression", seed=7))
|
|
294
332
|
|
|
295
|
-
history = trainer.fit(
|
|
333
|
+
history = trainer.fit(
|
|
334
|
+
DataLoader(train_data, batch_size=2),
|
|
335
|
+
epochs=50,
|
|
336
|
+
validation_loader=DataLoader(val_data, batch_size=1),
|
|
337
|
+
callbacks=[
|
|
338
|
+
LrLogger(),
|
|
339
|
+
CSVLogger(project.logs_dir / "history.csv"),
|
|
340
|
+
CheckpointCallback(project.checkpoints_dir / "best.tsmodel", save_best_only=True),
|
|
341
|
+
],
|
|
342
|
+
)
|
|
296
343
|
save_state_dict(model, project.checkpoint_path("weights"))
|
|
297
344
|
print(history.last)
|
|
298
345
|
```
|
|
@@ -327,11 +374,11 @@ Run the loose local regression thresholds with:
|
|
|
327
374
|
python benchmark_all.py --check-thresholds
|
|
328
375
|
```
|
|
329
376
|
|
|
330
|
-
On one Windows CPython 3.10 development run reporting `1.
|
|
377
|
+
On one Windows CPython 3.10 development run reporting `1.10.0`, with
|
|
331
378
|
TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
|
|
332
379
|
reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
|
|
333
380
|
benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
|
|
334
|
-
available on that machine; TensorStudio won
|
|
381
|
+
available on that machine; TensorStudio won 38 local cases and lost 60. The
|
|
335
382
|
strongest local wins were the simple NumPy convolution/pooling reference loops
|
|
336
383
|
and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
|
|
337
384
|
many elementwise, reduction, matrix multiplication, larger activation, and
|
|
@@ -343,15 +390,15 @@ Snapshot from that local run:
|
|
|
343
390
|
|
|
344
391
|
| operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
|
|
345
392
|
|---|---:|---:|---:|---:|---:|---:|
|
|
346
|
-
| `sigmoid` | `(32,)` | 0.
|
|
347
|
-
| `mean` | `(32,)` | 0.
|
|
348
|
-
| `sum_axis1` | `(16, 16)` | 0.
|
|
349
|
-
| `chain_relu` | `(128,)` | 0.
|
|
350
|
-
| `matmul` | `(256, 256)` | 2.
|
|
351
|
-
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.
|
|
352
|
-
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
353
|
-
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
354
|
-
| `elementwise_backward` | `(1024,)` | 2.
|
|
393
|
+
| `sigmoid` | `(32,)` | 0.0150 ms | 0.0046 ms | 0.0723 ms | 0.3056x | 4.8092x |
|
|
394
|
+
| `mean` | `(32,)` | 0.0154 ms | 0.0078 ms | 0.0111 ms | 0.5097x | 0.7198x |
|
|
395
|
+
| `sum_axis1` | `(16, 16)` | 0.0159 ms | 0.0030 ms | 0.0129 ms | 0.1904x | 0.8133x |
|
|
396
|
+
| `chain_relu` | `(128,)` | 0.0859 ms | 0.0056 ms | 0.0888 ms | 0.0647x | 1.0337x |
|
|
397
|
+
| `matmul` | `(256, 256)` | 2.0731 ms | 0.4017 ms | 0.2497 ms | 0.1938x | 0.1204x |
|
|
398
|
+
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.2028 ms | 1.3615 ms | 0.1219 ms | 6.7128x | 0.6012x |
|
|
399
|
+
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0279 ms | 0.1740 ms | n/a | 6.2464x | n/a |
|
|
400
|
+
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0275 ms | 0.5906 ms | n/a | 21.4893x | n/a |
|
|
401
|
+
| `elementwise_backward` | `(1024,)` | 2.7546 ms | n/a | n/a | n/a | n/a |
|
|
355
402
|
|
|
356
403
|
Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
|
|
357
404
|
favor TensorStudio.
|
|
@@ -452,8 +499,9 @@ tokens or print secrets.
|
|
|
452
499
|
exposing a compatible CBLAS/Accelerate interface; otherwise TensorStudio uses
|
|
453
500
|
a portable C++ fallback.
|
|
454
501
|
- No graph compiler or distributed runtime.
|
|
455
|
-
- Convolution and pooling support are
|
|
456
|
-
`conv2d`, `
|
|
502
|
+
- Convolution and pooling support are CPU-only. Native kernels include NCHW
|
|
503
|
+
`conv2d`, grouped/depthwise convolution, `conv_transpose2d`, `max_pool2d`,
|
|
504
|
+
`avg_pool2d`, and embedding lookup; they are not CUDA/cuDNN replacements.
|
|
457
505
|
- Vision covers local image-classification utilities, metrics, visualization,
|
|
458
506
|
and compact CNNs. It is not an OpenCV replacement and does not include
|
|
459
507
|
pretrained model zoos, detection/segmentation training stacks, video IO, or
|