Skip to content

Commit 2feff36

Browse files
committed
image tensors - wip
1 parent 613fc3f commit 2feff36

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/dtype_next/image_processing_with_tensors.clj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@
3232
;; - **Type discipline**: Explicit control over precision and overflow
3333
;;
3434

35+
;; ## What Are Tensors?
36+
37+
;; A [tensor](https://en.wikipedia.org/wiki/Tensor_(machine_learning)) is a multi-dimensional
38+
;; array of numbers with a defined shape and type. While the term comes from mathematics and
39+
;; physics, in programming it simply means: **structured numerical data with multiple axes**.
40+
;;
41+
;; - A scalar is a 0D tensor (single number)
42+
;; - A vector is a 1D tensor `[5]` → 5 elements
43+
;; - A matrix is a 2D tensor `[3 4]` → 3 rows × 4 columns
44+
;; - An RGB image is a 3D tensor `[height width 3]` → spatial dimensions + color channels
45+
;; - A video is a 4D tensor `[time height width 3]` → adding a time axis
46+
;;
47+
;; Tensors provide efficient storage (typed, contiguous memory) and convenient multi-dimensional
48+
;; indexing. Operations on tensors (slicing, element-wise math, reductions) form the foundation
49+
;; of numerical computing, from image processing to machine learning.
50+
3551
;; ## About This Tutorial
3652

3753
;; [dtype-next](https://github.com/cnuernber/dtype-next) is a comprehensive library

0 commit comments

Comments
 (0)