diff --git a/.nojekyll b/.nojekyll
new file mode 100644
index 00000000..e69de29b
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..37ac849a
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,85 @@
+FROM jupyter/base-notebook:latest
+
+# Install .NET CLI dependencies
+
+ARG NB_USER=fsdocs-user
+ARG NB_UID=1000
+ENV USER ${NB_USER}
+ENV NB_UID ${NB_UID}
+ENV HOME /home/${NB_USER}
+
+WORKDIR ${HOME}
+
+USER root
+
+ENV \
+ # Enable detection of running in a container
+ DOTNET_RUNNING_IN_CONTAINER=true \
+ # Enable correct mode for dotnet watch (only mode supported in a container)
+ DOTNET_USE_POLLING_FILE_WATCHER=true \
+ # Skip extraction of XML docs - generally not useful within an image/container - helps performance
+ NUGET_XMLDOC_MODE=skip \
+ # Opt out of telemetry until after we install jupyter when building the image, this prevents caching of machine id
+ DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT=true \
+ DOTNET_SDK_VERSION=5.0.202
+
+# Install .NET CLI dependencies
+RUN apt-get update \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ libc6 \
+ libgcc1 \
+ libgssapi-krb5-2 \
+ libicu66 \
+ libssl1.1 \
+ libstdc++6 \
+ zlib1g \
+ curl \
+ git \
+ && rm -rf /var/lib/apt/lists/*
+
+# When updating the SDK version, the sha512 value a few lines down must also be updated.
+# Install .NET SDK
+RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz \
+ && dotnet_sha512='01ed59f236184987405673d24940d55ce29d830e7dbbc19556fdc03893039e6046712de6f901dc9911047a0dee4fd15319b7e94f8a31df6b981fa35bd93d9838' \
+ && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
+ && mkdir -p /usr/share/dotnet \
+ && tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \
+ && rm dotnet.tar.gz \
+ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
+ # Trigger first run experience by running arbitrary cmd
+ && dotnet help
+
+# Copy notebooks
+COPY ./ ${HOME}/notebooks/
+
+# Copy package sources
+# COPY ./NuGet.config ${HOME}/nuget.config
+
+RUN chown -R ${NB_UID} ${HOME}
+USER ${USER}
+
+# Clone and build Furnace-cpu bundle to get the latest TorchSharp and libtorch-cpu packages downloaded and cached by nuget within the Docker image
+# This the makes user experience faster when running #r "nuget: Furnace-cpu
+RUN git clone --depth 1 https://github.com/Furnace/Furnace.git \
+ && dotnet build Furnace/bundles/Furnace-cpu
+
+#Install nteract
+RUN pip install nteract_on_jupyter
+
+# Install lastest build from master branch of Microsoft.DotNet.Interactive
+RUN dotnet tool install -g --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" Microsoft.dotnet-interactive
+
+#latest stable from nuget.org
+#RUN dotnet tool install -g Microsoft.dotnet-interactive --add-source "https://api.nuget.org/v3/index.json"
+
+ENV PATH="${PATH}:${HOME}/.dotnet/tools"
+RUN echo "$PATH"
+
+# Install kernel specs
+RUN dotnet interactive jupyter install
+
+# Enable telemetry once we install jupyter for the image
+ENV DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT=false
+
+# Set root to notebooks
+WORKDIR ${HOME}/notebooks/
\ No newline at end of file
diff --git a/NuGet.config b/NuGet.config
new file mode 100755
index 00000000..cf1ace51
--- /dev/null
+++ b/NuGet.config
@@ -0,0 +1,14 @@
+
+
The Dockerfile
and NuGet.config
allow us to run generated notebooks in MyBinder
To iterate on docs (requires evaluation off since DLLs get locked)
+dotnet fsdocs watch
+
+To use a local build of FSharp.Formatting:
+ git clone https://github.com/fsprojects/FSharp.Formatting ../FSharp.Formatting
+ pushd ..
+ .
+ popd
+ pop
+
+Then:
+ ..
+ ..
+
+Notebooks are generated for all .md and .fsx files under docs as part of the build.
+Dockerfile - see https://github.com/dotnet/interactive/blob/master/docs/CreateBinder.md
See MyBinder for creating URLs
+ + +© Copyright 2025, Furnace Contributors.
+// PyTorch style
+
+// Furnace style
+
+
+
+ © Copyright 2025, Furnace Contributors.
+Furnace provides most of the essential operations found in tensor libraries such as NumPy, PyTorch, and TensorFlow. All differentiable operations support the forward, reverse, and nested differentiation modes.
+When implementing new operations, you should prefer to implement these as compositions of existing Furnace Tensor operations, which would give you differentiability out of the box.
+In the rare cases where you need to extend Furnace with a completely new differentiable operation that cannot be implemented as a composition of existing operations, you can use the provided extension API.
+If the function you would like to implement is a simple elementwise function, you can use the UnaryOpElementwise or BinaryOpElementwise types to define your function and its derivatives. The forward, reverse, and nested differentiation rules for the function are automatically generated by the type. The documentation of these two types detail how they should be instantiated.
+Let's see several examples.
+\(f(a) = \mathrm{sin}(a)\), with derivative \(\frac{\partial f(a)}{\partial a} = \mathrm{cos}(a) \;\).
+open Furnace
+
+type Tensor with
+ member a.sin() =
+ Tensor.Op
+ { new UnaryOpElementwise("sin") with
+ member _.fRaw(a) = a.SinT()
+ member _.dfda(a,f) = a.cos()
+ }
+ (a)
+
+\(f(a) = \mathrm{log}(a)\), with derivative \(\frac{\partial f(a)}{\partial a} = 1/a \;\).
+type Tensor with
+ member a.log() =
+ Tensor.Op
+ { new UnaryOpElementwise("log") with
+ member _.fRaw(a) = a.LogT()
+ member _.dfda(a,f) = 1/a
+ }
+ (a)
+
+\(f(a, b) = ab\), with derivatives \(\frac{\partial f(a, b)}{\partial a} = b\), \(\frac{\partial f(a, b)}{\partial b} = a \;\).
+type Tensor with
+ member a.mul(b) =
+ Tensor.Op
+ { new BinaryOpElementwise("mul") with
+ member _.fRaw(a,b) = a.MulTT(b)
+ member _.dfda(a,b,f) = b
+ member _.dfdb(a,b,f) = a
+ }
+ (a,b)
+
+\(f(a, b) = a^b\), with derivatives \(\frac{\partial f(a, b)}{\partial a} = b a^{b-1}\), \(\frac{\partial f(a, b)}{\partial b} = a^b \mathrm{log}(a) \;\). Note the use of the argument f
in the derivative definitions that makes use of the pre-computed value of \(f(a, b) = a^b\) that is available to the derivative implementation.
type Tensor with
+ member a.pow(b) =
+ Tensor.Op
+ { new BinaryOpElementwise("pow") with
+ member _.fRaw(a,b) = a.PowTT(b)
+ member _.dfda(a,b,f) = b * f / a // equivalent to b * a.pow(b-1)
+ member _.dfdb(a,b,f) = f * a.log() // equivalent to a.pow(b) * a.log()
+ }
+ (a,b)
+
+For more complicated functions, you can use the most general way of defining functions using the UnaryOp or BinaryOp types, which allow you to define the full forward and reverse mode differentiation rules. The documentation of these two types detail how they should be instantiated.
+Let's see several examples.
+\(f(A) = A^{\intercal}\), with the forward derivative propagation rule \(\frac{\partial f(A)}{\partial X} = \frac{\partial A}{\partial X} \frac{\partial f(A)}{\partial A} = (\frac{\partial A}{\partial X})^{\intercal}\) and the reverse derivative propagation rule \(\frac{\partial Y}{\partial A} = \frac{\partial Y}{\partial f(A)} \frac{\partial f(A)}{\partial A} = (\frac{\partial Y}{\partial f(A)})^{\intercal} \;\).
+type Tensor with
+ member a.transpose() =
+ Tensor.Op
+ { new UnaryOp("transpose") with
+ member _.fRaw(a) = a.TransposeT2()
+ member _.ad_dfda(a,ad,f) = ad.transpose()
+ member _.fd_dfda(a,f,fd) = fd.transpose()
+ }
+ (a)
+
+\(f(A, B) = AB\), with the forward derivative propagation rule \(\frac{\partial(A, B)}{\partial X} = \frac{\partial A}{\partial X} \frac{\partial f(A, B)}{\partial A} + \frac{\partial B}{\partial X} \frac{\partial f(A, B)}{\partial B} = \frac{\partial A}{\partial X} B + A \frac{\partial B}{\partial X}\) and the reverse propagation rule \(\frac{\partial Y}{\partial A} = \frac{\partial Y}{\partial f(A, B)} \frac{\partial f(A, B)}{\partial A} = \frac{\partial Y}{\partial f(A, B)} B^{\intercal}\), \(\frac{\partial Y}{\partial B} = \frac{\partial Y}{\partial f(A, B)} \frac{\partial f(A, B)}{B} = A^{\intercal} \frac{\partial Y}{\partial f(A, B)} \;\).
+type Tensor with
+ member a.matmul(b) =
+ Tensor.Op
+ { new BinaryOp("matmul") with
+ member _.fRaw(a,b) = a.MatMulTT(b)
+ member _.ad_dfda(a,ad,b,f) = ad.matmul(b)
+ member _.bd_dfdb(a,b,bd,f) = a.matmul(bd)
+ member _.fd_dfda(a,b,f,fd) = fd.matmul(b.transpose())
+ member _.fd_dfdb(a,b,f,fd) = a.transpose().matmul(fd)
+ }
+ (a,b)
+
+
+ © Copyright 2025, Furnace Contributors.
+Furnace is a tensor library with support for differentiable programming. +It is designed for use in machine learning, probabilistic programming, optimization and other domains.
+ +🗹 Nested and mixed-mode differentiation
+🗹 Common optimizers, model elements, differentiable probability distributions
+🗹 F# for robust functional programming
+🗹 PyTorch familiar naming and idioms, efficient LibTorch CUDA/C++ tensors with GPU support
+🗹 Linux, macOS, Windows supported
+🗹 Use interactive notebooks in Jupyter and Visual Studio Code
+🗹 100% open source
+Furnace provides world-leading automatic differentiation capabilities for tensor code, including composable gradients, Hessians, Jacobians, directional derivatives, and matrix-free Hessian- and Jacobian-vector products over arbitrary user code. This goes beyond conventional tensor libraries such as PyTorch and TensorFlow, allowing the use of nested forward and reverse differentiation up to any level.
+With Furnace, you can compute higher-order derivatives efficiently and differentiate functions that are internally making use of differentiation and gradient-based optimization.
+ +Furnace comes with a LibTorch backend, using the same C++ and CUDA implementations for tensor computations that power PyTorch. On top of these raw tensors (LibTorch's ATen, excluding autograd), Furnace implements its own computation graph and differentiation capabilities. It is tested on Linux, macOS, and Windows, and it supports CUDA and GPUs.
+The Furnace API is designed to be similar to the PyTorch Python API through very similar naming and idioms, and where elements have similar names the PyTorch documentation can generally be used as a guide.
+Furnace uses the incredible F# programming language for tensor programming. F# code is generally faster and more robust than equivalent Python code, while still being succinct and compact like Python, making it an ideal modern AI and machine learning implementation language. This allows fluent and productive code for tensor programming.
+ + +All documentation pages in this website are interactive notebooks which you can execute directly in your browser without installing anything in your local machine.
+Using the on the top of each page, you can execute the page as an interactive notebook running on cloud servers provided by Google Colab.
Using the buttons
+
you can also download a page as a script or an interactive notebook, which you can execute locally in Jupyter or Visual Studio Code using dotnet interactive.
Define and add two tensors:
+open Furnace
+
+let t1 = FurnaceImage.tensor [ 0.0 ..0.2.. 1.0 ] // Gives [0., 0.2, 0.4, 0.6, 0.8, 1.]
+let t2 = FurnaceImage.tensor [ 1, 2, 3, 4, 5, 6 ]
+
+t1 + t2
+
+
|
Compute a convolution:
+let t3 = FurnaceImage.tensor [[[[0.0 .. 10.0]]]]
+let t4 = FurnaceImage.tensor [[[[0.0 ..0.1.. 1.0]]]]
+
+t3.conv2d(t4)
+
+
|
Take the gradient of a vector-to-scalar function:
+let f (x: Tensor) = x.exp().sum()
+
+FurnaceImage.grad f (FurnaceImage.tensor([1.8, 2.5]))
+
+
|
Compute a nested derivative (checking for perturbation confusion):
+let x0 = FurnaceImage.tensor(1.)
+let y0 = FurnaceImage.tensor(2.)
+FurnaceImage.diff (fun x -> x * FurnaceImage.diff (fun y -> x * y) y0) x0
+
+
|
Define a model and optimize it:
+open Furnace
+open Furnace.Data
+open Furnace.Model
+open Furnace.Compose
+open Furnace.Util
+open Furnace.Optim
+
+let epochs = 2
+let batchSize = 32
+let numBatches = 5
+
+let trainSet = MNIST("../data", train=true, transform=id)
+let trainLoader = trainSet.loader(batchSize=batchSize, shuffle=true)
+
+let validSet = MNIST("../data", train=false, transform=id)
+let validLoader = validSet.loader(batchSize=batchSize, shuffle=false)
+
+let encoder =
+ Conv2d(1, 32, 4, 2)
+ --> FurnaceImage.relu
+ --> Conv2d(32, 64, 4, 2)
+ --> FurnaceImage.relu
+ --> Conv2d(64, 128, 4, 2)
+ --> FurnaceImage.flatten(1)
+
+let decoder =
+ FurnaceImage.unflatten(1, [128;1;1])
+ --> ConvTranspose2d(128, 64, 4, 2)
+ --> FurnaceImage.relu
+ --> ConvTranspose2d(64, 32, 4, 3)
+ --> FurnaceImage.relu
+ --> ConvTranspose2d(32, 1, 4, 2)
+ --> FurnaceImage.sigmoid
+
+let model = VAE([1;28;28], 64, encoder, decoder)
+
+let lr = FurnaceImage.tensor(0.001)
+let optimizer = Adam(model, lr=lr)
+
+for epoch = 1 to epochs do
+ let batches = trainLoader.epoch(numBatches)
+ for i, x, _ in batches do
+ model.reverseDiff()
+ let l = model.loss(x)
+ l.reverse()
+ optimizer.step()
+ print $"Epoch: {epoch} minibatch: {i} loss: {l}"
+
+let validLoss =
+ validLoader.epoch()
+ |> Seq.sumBy (fun (_, x, _) -> model.loss(x, normalize=false))
+print $"Validation loss: {validLoss/validSet.length}"
+
+Numerous other model definition, differentiation, and training patterns are supported. See the tutorials in the left-hand menu and examples on GitHub.
+Furnace is developed by Atılım Güneş Baydin, Don Syme +and other contributors, having started as a project supervised by the automatic differentiation wizards Barak Pearlmutter and Jeffrey Siskind.
+Please join us on GitHub!
+ +© Copyright 2025, Furnace Contributors.
+Furnace runs on dotnet, a cross-platform, open-source platform supported on Linux, macOS, and Windows.
+There are various ways in which you can run Furnace, the main ones being: interactive notebooks supporting Visual Studio Code and Jupyter; running in a REPL; running script files; and compiling, packing, and publishing performant binaries.
+You can use Furnace in dotnet interactive notebooks in Visual Studio Code or Jupyter, or in F# scripts (.fsx
files), by referencing the package as follows:
// Use one of the following three lines
+#r "nuget: Furnace-cpu" // Use the latest version
+#r "nuget: Furnace-cpu, *-*" // Use the latest pre-release version
+#r "nuget: Furnace-cpu, 1.0.1" // Use a specific version
+
+open Furnace
+
+
+You can add Furnace to your dotnet application using the dotnet command-line interface (CLI).
+For example, the following creates a new F# console application and adds the latest pre-release version of the Furnace-cpu
package as a dependency.
dotnet new console -lang "F#" -o src/app
+cd src/app
+dotnet add package --prerelease Furnace-cpu
+dotnet run
+
+We provide several package bundles for a variety of use cases.
+You can combine the Furnace-lite
package bundle with existing local native binaries of LibTorch for your OS (Linux, Mac, or Windows) installed through other means.
LibTorch is the main tensor computation core implemented in C++/CUDA and it is used by PyTorch in Python and by other projects in various programming languages. The following are two common ways of having LibTorch in your system.
+Before using the Torch
backend in Furnace, you will have to add an explicit load of the LibTorch native library, which you can do as follows. In order to find the location of LibTorch binaries, searching for libtorch.so
in your system might be helpful. Note that this file is called libtorch.so
in Linux, libtorch.dylib
in macOS, and torch.dll
in Windows.
open System.Runtime.InteropServices
+NativeLibrary.Load("/home/user/anaconda3/lib/python3.8/site-packages/torch/lib/libtorch.so")
+
+Furnace currently provides two computation backends.
+The Torch
backend is the default and recommended backend based on LibTorch, using the same C++ and CUDA implementations for tensor computations that power PyTorch. On top of these raw tensors (LibTorch's ATen, excluding autograd), Furnace implements its own computation graph and differentiation capabilities. This backend requires platform-specific binaries of LibTorch, which we provide and test on Linux, macOS, and Windows.
The Reference
backend is implemented purely in F# and can run on any hardware platform where dotnet can run (for example iOS, Android, Raspberry Pi). This backend has reasonable performance for use cases dominated by scalar and small tensor operations, and is not recommended for use cases involving large tensor operations (such as machine learning). This backend is always available.
Selection of the default backend, device, and tensor type is done using FurnaceImage.config.
+Dtype choices available: BFloat16
, Bool
, Byte
, Float16
, Float32
, Float64
, Int16
, Int32
, Int64
, Int8
Device choices available: CPU
, GPU
Backend choices available: Reference
, Torch
For example, the following selects the Torch
backend with single precision tensors as the default tensor type and GPU (CUDA) execution.
open Furnace
+
+FurnaceImage.config(dtype=Dtype.Float32, device=Device.GPU, backend=Backend.Torch)
+
+The following selects the Reference
backend.
FurnaceImage.config(backend=Backend.Reference)
+
+A tensor's backend and device can be inspected as follows.
+let t = FurnaceImage.tensor [ 0 .. 10 ]
+
+let device = t.device
+let backend = t.backend
+
+Tensors can be moved between devices (for example from CPU to GPU) using Tensor.move. For example:
+let t2 = t.move(Device.GPU)
+
+To develop libraries built on Furnace, you can use the following guideline to reference the various packages.
+Furnace.Core
and Furnace.Data
in your library code.Furnace.Backends.Reference
in your correctness testing code.Furnace.Backends.Torch
and libtorch-cpu
in your CPU testing code.Furnace.Backends.Torch
and libtorch-cuda-linux
or libtorch-cuda-windows
in your (optional) GPU testing code.© Copyright 2025, Furnace Contributors.
+Test
+open Furnace
+
+FurnaceImage.config(backend=Backend.Reference)
+
+let a = FurnaceImage.tensor([1,2,3])
+printfn "%A" a
+
+
|
© Copyright 2025, Furnace Contributors.
+© Copyright 2025, Furnace Contributors.
+© Copyright 2025, Furnace Contributors.
+© Copyright 2025, Furnace Contributors.
+Here we cover some key tasks involved in a typical machine learning pipeline and how these can be implemented with Furnace. Note that a significant part of Furnace's design has been influenced by PyTorch and you would feel mostly at home if you have familiarity with PyTorch.
+Furnace provides the Dataset type that represents a data source and the DataLoader type that handles the loading of data from datasets and iterating over minibatches of data.
+See the Furnace.Data namespace for the full API reference.
+Furnace has ready-to-use types that cover main datasets typically used in machine learning, such as MNIST, CIFAR10, CIFAR100, and also more generic dataset types such as TensorDataset or ImageDataset.
+The following loads the MNIST dataset and shows one image entry and the corresponding label.
+open Furnace
+open Furnace.Data
+
+// First ten images in MNIST training set
+let dataset = MNIST("../data", train=true, transform=id, n=10)
+
+// Inspect a single image and label
+let data, label = dataset[7]
+
+// Save image to file
+data.saveImage("test.png")
+
+
|
// Inspect data as ASCII and show label
+printfn "Data: %A\nLabel: %A" (data.toImageString()) label
+
+
|
A data loader handles tasks such as constructing minibatches from an underlying dataset on-the-fly, shuffling the data, and moving the data tensors between devices. In the example below we show a single batch of six MNIST images and their corresponding classification labels.
+let loader = DataLoader(dataset, shuffle=true, batchSize=6)
+let batch, labels = loader.batch()
+
+printfn "%A\nLabels: %A" (batch.toImageString()) labels
+
+
|
In practice a data loader is typically used to iterate over all minibatches in a given dataset in order to feed each minibatch through a machine learning model. One full iteration over the dataset would be called an "epoch". Typically you would perform multiple such epochs of iterations during the training of a model.
+for epoch = 1 to 10 do
+ for i, data, labels in loader.epoch() do
+ printfn "Epoch %A, minibatch %A" epoch (i+1)
+ // Process the minibatch
+ // ...
+
+Many machine learning models are differentiable functions whose parameters can be tuned via gradient-based optimization, finding an optimum for an objective function that quantifies the fit of the model to a given set of data. These models are typically built as compositions non-linear functions and ready-to-use building blocks such as linear, recurrent, and convolutional layers.
+Furnace provides the most commonly used model building blocks including convolutions, transposed convolutions, batch normalization, dropout, recurrent and other architectures.
+See the Furnace.Model namespace for the full API reference.
+If you have experience with PyTorch, you would find the following way of model definition familiar. Let's look at an example of a generative adversarial network (GAN) architecture.
+open Furnace.Model
+open Furnace.Compose
+
+// PyTorch style
+
+// Define a model class inheriting the base
+type Generator(nz: int) =
+ inherit Model()
+ let fc1 = Linear(nz, 256)
+ let fc2 = Linear(256, 512)
+ let fc3 = Linear(512, 1024)
+ let fc4 = Linear(1024, 28*28)
+ do base.addModel(fc1, fc2, fc3, fc4)
+ override self.forward(x) =
+ x
+ |> FurnaceImage.view([-1;nz])
+ |> fc1.forward
+ |> FurnaceImage.leakyRelu(0.2)
+ |> fc2.forward
+ |> FurnaceImage.leakyRelu(0.2)
+ |> fc3.forward
+ |> FurnaceImage.leakyRelu(0.2)
+ |> fc4.forward
+ |> FurnaceImage.tanh
+
+// Define a model class inheriting the base
+type Discriminator(nz:int) =
+ inherit Model()
+ let fc1 = Linear(28*28, 1024)
+ let fc2 = Linear(1024, 512)
+ let fc3 = Linear(512, 256)
+ let fc4 = Linear(256, 1)
+ do base.addModel(fc1, fc2, fc3, fc4)
+ override self.forward(x) =
+ x
+ |> FurnaceImage.view([-1;28*28])
+ |> fc1.forward
+ |> FurnaceImage.leakyRelu(0.2)
+ |> FurnaceImage.dropout(0.3)
+ |> fc2.forward
+ |> FurnaceImage.leakyRelu(0.2)
+ |> FurnaceImage.dropout(0.3)
+ |> fc3.forward
+ |> FurnaceImage.leakyRelu(0.2)
+ |> FurnaceImage.dropout(0.3)
+ |> fc4.forward
+ |> FurnaceImage.sigmoid
+
+// Instantiate the defined classes
+let nz = 128
+let gen = Generator(nz)
+let dis = Discriminator(nz)
+
+print gen
+print dis
+
+
|
A key advantage of Furnace lies in the functional programming paradigm enabled by the F# language, where functions are first-class citizens, many algorithms can be constructed by applying and composing functions, and differentiation operations can be expressed as composable higher-order functions. This allows very succinct (and beautiful) machine learning code to be expressed as a powerful combination of lambda calculus and differential calculus.
+For example, the following constructs the same GAN architecture (that we constructed in PyTorch style in the previous section) using Furnace's -->
composition operator, which allows you to seamlessly compose Model
instances and differentiable Tensor->Tensor
functions.
// Furnace style
+
+// Model as a composition of models and Tensor->Tensor functions
+let generator =
+ FurnaceImage.view([-1;nz])
+ --> Linear(nz, 256)
+ --> FurnaceImage.leakyRelu(0.2)
+ --> Linear(256, 512)
+ --> FurnaceImage.leakyRelu(0.2)
+ --> Linear(512, 1024)
+ --> FurnaceImage.leakyRelu(0.2)
+ --> Linear(1024, 28*28)
+ --> FurnaceImage.tanh
+
+// Model as a composition of models and Tensor->Tensor functions
+let discriminator =
+ FurnaceImage.view([-1; 28*28])
+ --> Linear(28*28, 1024)
+ --> FurnaceImage.leakyRelu(0.2)
+ --> FurnaceImage.dropout(0.3)
+ --> Linear(1024, 512)
+ --> FurnaceImage.leakyRelu(0.2)
+ --> FurnaceImage.dropout(0.3)
+ --> Linear(512, 256)
+ --> FurnaceImage.leakyRelu(0.2)
+ --> FurnaceImage.dropout(0.3)
+ --> Linear(256, 1)
+ --> FurnaceImage.sigmoid
+
+print generator
+print discriminator
+
+
|
© Copyright 2025, Furnace Contributors.
++ + Represents a backend for Furnace tensors + +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Other(name, code)
+ + + Parameters: +
string
+
+ + + + code + + : + int
+
+ + + |
+
+
+
+
+ ![]() ![]() + + Reserved for future use + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Reference
+ + + |
+
+
+
+
+ ![]() ![]() + + The reference backend + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + The LibTorch backend + + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Name
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Get
+ + + Parameters: +
Backend
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains functions and settings related to backend specifications. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Get or set the default backend used when creating tensors. Note, use
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Register name
+ + + Parameters: +
string
+
+ + + + Returns: + Backend
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Represents the static functionality for tensors implemented by a Furnace backend. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Create a tensor of appropriate dtype from a scalar or array of appropriate values. + A backend type is delivered consistent with in-memory data - a type for dtype Int32 gets int32 data etc. + + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with arbitrary values for the given shape and device + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with the given value for the given shape and device + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetDevices
+ + + Parameters: +
DeviceType
+
+ + + + Returns: + Device list
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsDeviceTypeAvailable
+ + + Parameters: +
DeviceType
+
+ + + + Returns: + bool
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+ + | +
+
+
+
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random values for the given shape and device + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random integers from the given range for the given shape and device + + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random values from the normal distribution for the given shape and device + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Seed
+ + + Parameters: +
int
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Sets the seed for the default random number generator of the backend + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+ + | +
+
+
+
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ BackendTensorStatics.Get(?backend)
+ + + Parameters: +
Backend
+
+ + + + Returns: + BackendTensorStatics
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Get the backend implementation for the given tensor element type and backend. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ BackendTensorStatics.Seed(?seed)
+ + + Parameters: +
int
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Seed all backends with the given random seed, or a new seed based on the current time + if no seed is specified. + + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Represents a raw (i.e. non-differentiable immutable) tensor implemented by a Furnace backend. + +
++ + Each backend will provide one of more .NET implementations of this type, which may in turn + wrap handles to native implementations. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AbsInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise absolute value of the tensor + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AcosInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise addition of the two tensors + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AddScalarInPlace
+ + + Parameters: +
scalar
+
+ + + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AddSliceInPlace
+ + + Parameters: +
int[]
+
+ + + + t2 + + : + RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AllClose
+ + + Parameters: +
RawTensor
+
+ + + + relativeTolerance + + : + float
+
+ + + + absoluteTolerance + + : + float
+
+ + + + Returns: + bool
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Indicates if the two tensors have the same shape and element type, and all corresponding values + are equal up to the given tolerances. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AsinInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AtanInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AvgPool1D
+ + + Parameters: +
int
+
+ + + + stride + + : + int
+
+ + + + padding + + : + int
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AvgPool2D
+ + + Parameters: +
int[]
+
+ + + + stride + + : + int[]
+
+ + + + padding + + : + int[]
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AvgPool3D
+ + + Parameters: +
int[]
+
+ + + + stride + + : + int[]
+
+ + + + padding + + : + int[]
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the reverse mode of a 1D avgpool of a tensor, apportioning each part of the adjoint equally to each corresponding input + ++ The originalInput parameter is only used for shape information + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the reverse mode of a 2D avgpool of a tensor, apportioning each part of the adjoint equally to each corresponding input + ++ The originalInput parameter is only used for shape information + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the reverse mode of a 3D avgpool of a tensor, apportioning each part of the adjoint equally to each corresponding input + ++ The originalInput parameter is only used for shape information + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a tensor where the elements have each been cast to the given tensor element storage type. + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.CeilInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise integer ceiling of the tensor + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by with values constrained by the corresponding elements in the low/high tensors. + + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a tensor with values constrained by the corresponding elements in the low/high tensors. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ComputeHash
+ + + + Returns: + int
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a hash of the contents of the tensor. This operation may cause the + tensor to be moved to the CPU, and its entire contents iterated. + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.CosInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.CoshInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with values drawn from the given .NET object for the + given configuration settings, defaulting to the configuration settings of the object tensor. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.DilateT
+ + + Parameters: +
int[]
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the dilation of the tensor using the given dilations parameters + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Dim
+ + + + Returns: + int
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise division of a scalar by a tensor, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.DivInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.DivScalarInPlace
+ + + Parameters: +
scalar
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise division of a tensor by a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise division of a tensor by a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with arbitrary values for the given shape and configuration settings, + defaulting to the configuration settings of the object tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.EqInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Modifies the tensor by comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a boolean tensor comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Equals
+ + + Parameters: +
RawTensor
+
+ + + + Returns: + bool
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ExpInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise natural exponentiation of the tensor + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.FlipT
+ + + Parameters: +
int[]
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.FloorInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise integer floor of the tensor + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with the given scalar value for the given shape and configuration settings, + defaulting to the configuration settings of the object tensor + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a tensor selecting the given indices from the given dimension and stacking those in the order specified. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GeInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Modifies the tensor by comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a boolean tensor comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetItem
+ + + Parameters: +
int[]
+
+ + + + Returns: + scalar
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a .NET object representing the value of the tensor at the given indexes + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int[,]
+ -
+
+ The indexes are an Nx3 array. The first row is the start bounds, the second row is
+ the end bounds, the third is 1/0 indicating dimension removal.
+
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GtInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Modifies the tensor by comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a boolean tensor comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Handle
+ + + + Returns: + obj
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a handle to the underlying representation of the the tensor. For example, if the Torch + backend is used this will be the corresponding TorchSharp TorchTensor. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the inverse of a single square matrix (2d tensor) or a batch of square matrices (3d tensor) + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a boolean tensor where each element indicates if the corresponding element in the tensor is an infinity value + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsMutable
+ + + + Returns: + bool
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a boolean tensor where each element indicates if the corresponding element in the tensor is a NaN value + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.LeInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Modifies the tensor by comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a boolean tensor comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Log10InPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise base10 logarithm of the tensor + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.LogInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise natural logarithm of the tensor + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.LtInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Modifies the tensor by comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a boolean tensor comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MatMulInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MaxIndexT
+ + + + Returns: + int[]
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the 1D maxpool of a tensor and its chosen maximum indices + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the 2D maxpool of a tensor and its chosen maximum indices + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the 3D maxpool of a tensor and its chosen maximum indices + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor containing values and indexes of a maximum value of the tensor reducing along the given dimension + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the 1D maxunpool of a tensor using the given indices for locations of maximums + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the 2D maxunpool of a tensor using the given indices for locations of maximums + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the 3D maxunpool of a tensor using the given indices for locations of maximums + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MinIndexT
+ + + + Returns: + int[]
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor containing values and indexes of a minimum value of the tensor reducing along the given dimension + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MulInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise multiplication of two tensors + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MulScalarInPlace
+ + + Parameters: +
scalar
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise multiplication of a tensor and a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise multiplication of a tensor and a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.NegInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Nelement
+ + + + Returns: + int
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.NeqInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Modifies the tensor by comparing each element pairwise with the corresponding element in
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a boolean tensor comparing each element pairwise with the corresponding element in
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a scalar one tensor for the given configuration settings, defaulting to the configuration settings of the object tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.OnesInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with one values for the given shape and configuration settings, + defaulting to the configuration settings of the object tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.PermuteT
+ + + Parameters: +
int[]
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a view of the original tensor with its dimensions permuted + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise exponentiation of a scalar and a tensor, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.PowInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise exponentiation of two tensors + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.PowScalarInPlace
+ + + Parameters: +
scalar
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise exponentiation of a tensor and a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise exponentiation of a tensor and a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Print
+ + + Parameters: +
string
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.RandomInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by setting it to random values taken from a uniform distribution in [0, 1). + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.RandomIntInPlace
+ + + Parameters: +
int
+
+ + + + high + + : + int
+
+ + + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random integer values from the given range for the given shape and configuration settings, + defaulting to the configuration settings of the object tensor + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random values for the given shape and configuration settings, + defaulting to the configuration settings of the object tensor + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.RandomNormalInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by setting all values taken from a normal distribution with mean 0 and variance 1. + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random values from a normal distribution for the given shape and configuration settings, + defaulting to the configuration settings of the object tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ReluInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.RoundInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a tensor with given destination shape where values are copied from the current tensor to locations specified by the dimension and indices. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SetMutable
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + A backdoor to switch this tensor to be usable as a mutable tensor. You should have a unique handle to + this tensor for the entire time it is being used as a mutable tensor. + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SigmoidInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SignInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SinInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SinhInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SoftplusInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the solution of single a square system of linear equations with a unique solution or a batch of several such systems + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SplitT
+ + + Parameters: +
int[]
+
+ + + + dim + + : + int
+
+ + + + Returns: + RawTensor[]
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SqrtInPlace
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise square root of the tensor + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SqueezeT
+ + + Parameters: +
int
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the tensor with the same values and the given dimension removed. The given dimension must be of size 1. + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise subtraction of the scalar and a tensor, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SubInPlace
+ + + Parameters: +
RawTensor
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise subtraction of two tensors + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SubScalarInPlace
+ + + Parameters: +
scalar
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Modifies the tensor by the element-wise subtraction of the tensor and a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise subtraction of the tensor and a scalar, where the scalar is logically + broadcast to the same shape as the tensor + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the scalar tensor for the summation of all elements in the tensor + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the tensor representing the summation of the tensor along the given dimension + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.TanInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.TanhInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a .NET array object for the values of a non-scalar tensor + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ToValues
+ + + + Returns: + obj
+
+ + Modifiers: + abstract + + |
+
+
+ + The runtime type of the returned object is either a .NET scalar + or array corresponding to the shape and element type of the tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.TransposeT
+ + + Parameters: +
int
+
+ + + + dim1 + + : + int
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the transpose of the tensor between the given dimensions + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.UndilateT
+ + + Parameters: +
int[]
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the reverse of the dilation of the tensor using the given dilations parameters + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.UnsqueezeT
+ + + Parameters: +
int
+
+ + + + Returns: + RawTensor
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the tensor with the same values and a dimension of size 1 inserted before the given dimension. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.UnstackT
+ + + Parameters: +
int
+
+ + + + Returns: + RawTensor[]
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the tensor with the same values viewed as a different shape + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a zero tensor for the given configuration settings, defaulting to the configuration settings of the object tensor + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ZerosInPlace
+ + + Modifiers: + abstract + + |
+ + + | +
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with zero values for the given shape and configuration settings, + defaulting to the configuration settings of the object tensor + + +
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with values drawn from the given .NET object. + + +
+
+ The value may be a scalar, an array, or an array of tupled objects. If the
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RawTensor.CreateFromFlatArray(values, shape, ?dtype, ?device, ?backend)
+ + + Parameters: +
Array
+
+ + + + shape + + : + Shape
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?device + + : + Device
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + RawTensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor containing arbitrary values for the given shape and configuration + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with the given value for the given shape and configuration + + +
|
+
+ + | +
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with 1 values for the given shape and configuration + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random values for the given shape and configuration + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RawTensor.RandomInt(shape, low, high, ?dtype, ?device, ?backend)
+ + + Parameters: +
Shape
+
+ + + + low + + : + int
+
+ + + + high + + : + int
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?device + + : + Device
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + RawTensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random integer values from the given range for the given shape and configuration + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets a tensor filled with random values from the normal distribution for the given shape and configuration + + +
|
+
+ + | +
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Contains types and functionality related to backend implementations for Furnace. +
++ Type + | ++ Description + | +
+ + + + BackendTensorStatics + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Represents the static functionality for tensors implemented by a Furnace backend. + + + |
+
+ + + + RawTensor + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Represents a raw (i.e. non-differentiable immutable) tensor implemented by a Furnace backend. + + + |
+
© Copyright 2025, Furnace Contributors.
++ Defines a new op implementing a binary function and its derivatives. Instances of this class are used with the Tensor.Op method to define a new differentiable tensor function that supports forward, reverse, and nested differentiation. +
++
This type represents the most generic definition of a new op representing a binary function, allowing the specification of: (1) the RawTensor operation, (2) the derivative propagation rule for the forward differentiation mode and (3) the derivative propagation rule for the reverse differentiation mode.
In general, if you are implementing a simple elementwise op, you should prefer using the BinaryOpElementwise type, which is much simpler to use.
+ ++
+ { new BinaryOp("matmul") with + member _.fRaw(a,b) = a.MatMulTT(b) + member _.ad_dfda(a,ad,b,f) = ad.matmul(b) + member _.bd_dfdb(a,b,bd,f) = a.matmul(bd) + member _.fd_dfda(a,b,f,fd) = fd.matmul(b.transpose()) + member _.fd_dfdb(a,b,f,fd) = a.transposeExt().matmul(fd) + }+ +
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ BinaryOp(name)
+ + + Parameters: +
string
+
+ + + + Returns: + BinaryOp
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ad_dfda (a, ad, b, f)
+ + + Parameters: +
Tensor
+ -
+ The first argument \( a \).
+
+ + + + ad + + : + Tensor
+ -
+ The first argument's derivative \( \frac{\partial a}{\partial x} \).
+
+ + + + b + + : + Tensor
+ -
+ The second argument \( b \).
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a, b) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial a}{\partial x} \frac{\partial f(a, b)}{\partial a} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative propagation rule for forward differentiation mode for the partial derivative with respect to the first argument of the function. This represents the contribution of the function's first argument \( a \) to the derivative of \( f(a, b) \) with respect a value \( x \) earlier in the computation graph than the function's arguments. In other words, it computes the first term in the right-hand side of the equation \( \frac{\partial f(a, b)}{\partial x} = \frac{\partial a}{\partial x} \frac{\partial f(a, b)}{\partial a} + \frac{\partial b}{\partial x} \frac{\partial f(a, b)}{\partial b} \). + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bd_dfdb (a, b, bd, f)
+ + + Parameters: +
Tensor
+ -
+ The first argument \( a \).
+
+ + + + b + + : + Tensor
+ -
+ The second argument \( b \).
+
+ + + + bd + + : + Tensor
+ -
+ The second argument's derivative \( \frac{\partial b}{\partial x} \).
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a, b) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial b}{\partial x} \frac{\partial f(a, b)}{\partial b} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative propagation rule for forward differentiation mode for the partial derivative with respect to the second argument of the function. This represents the contribution of the function's second argument \( b \) to the derivative of \( f(a, b) \) with respect a value \( x \) earlier in the computation graph than the function's arguments. In other words, it computes the second term in the right-hand side of the equation \( \frac{\partial f(a, b)}{\partial x} = \frac{\partial a}{\partial x} \frac{\partial f(a, b)}{\partial a} + \frac{\partial b}{\partial x} \frac{\partial f(a, b)}{\partial b} \). + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.fd_dfda (a, b, f, fd)
+ + + Parameters: +
Tensor
+ -
+ The first argument \( a \).
+
+ + + + b + + : + Tensor
+ -
+ The second argument \( b \).
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a, b) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + fd + + : + Tensor
+ -
+ The derivative with respect to the function's output \( \frac{\partial y}{\partial f(a, b)} \).
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial y}{\partial a} = \frac{\partial y}{\partial f(a, b)} \frac{\partial f(a, b)}{\partial a} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative propagation rule for reverse differentiation mode for the partial derivative with respect to the first argument of the function. This represents the derivative of a value \( y \), which comes later in the computation graph than the function's value \( f(a, b) \), with respect to the function's first argument \( a \). In other words, it computes \( \frac{\partial y}{\partial a} = \frac{\partial y}{\partial f(a, b)} \frac{\partial f(a, b)}{\partial a} \). + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.fd_dfdb (a, b, f, fd)
+ + + Parameters: +
Tensor
+ -
+ The first argument \( a \).
+
+ + + + b + + : + Tensor
+ -
+ The second argument \( b \).
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a, b) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + fd + + : + Tensor
+ -
+ The derivative with respect to the function's output \( \frac{\partial y}{\partial f(a, b)} \).
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial y}{\partial b} = \frac{\partial y}{\partial f(a, b)} \frac{\partial f(a, b)}{\partial b} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative propagation rule for reverse differentiation mode for the partial derivative with respect to the second argument of the function. This represents the derivative of a value \( y \), which comes later in the computation graph than the function's value \( f(a, b) \), with respect to the function's second argument \( b \). In other words, it computes \( \frac{\partial y}{\partial b} = \frac{\partial y}{\partial f(a, b)} \frac{\partial f(a, b)}{\partial b} \). + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.name
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Defines a new op implementing an elementwise binary function and its derivatives. Instances of this class are used with the Tensor.Op method to define a new differentiable tensor function that supports forward, reverse, and nested differentiation. +
++ + This type is specialized to elementwise ops. It requires the user to specify only (1) the RawTensor operation and (2) the derivative of the function with respect to each argument. The corresponding derivative propagation rules for the forward and reverse differentiation modes are automatically generated. +
If you are implementing a complex op that is not elementwise, you can use the generic type BinaryOp, which allows you to define the full derivative propagation rules.
+ ++
+ { new BinaryOpElementwise("pow") with + member _.fRaw(a,b) = a.PowTT(b) + member _.dfda(a,b,f) = b * f / a + member _.dfdb(a,b,f) = f * a.log() + } + + { new BinaryOpElementwise("mul") with + member _.fRaw(a,b) = a.MulTT(b) + member _.dfda(a,b,f) = b + member _.dfdb(a,b,f) = a + }+ +
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ BinaryOpElementwise(name)
+ + + Parameters: +
string
+
+ + + + Returns: + BinaryOpElementwise
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dfda (a, b, f)
+ + + Parameters: +
Tensor
+ -
+ The first argument \( a \)
+
+ + + + b + + : + Tensor
+ -
+ The second argument \( b \)
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a, b) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial f(a, b)}{\partial a} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative of the function with respect to its first argument, \( \frac{\partial f(a, b)}{\partial a} \). + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dfdb (a, b, f)
+ + + Parameters: +
Tensor
+ -
+ The first argument \( a \)
+
+ + + + b + + : + Tensor
+ -
+ The second argument \( b \)
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a, b) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial f(a, b)}{\partial b} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative of the function with respect to its second argument, \( \frac{\partial f(a, b)}{\partial b} \). + +
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.arangeLike (endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+
+ + + + ?startVal + + : + float
+
+ + + + ?step + + : + float
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.arangeLike (endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + ?startVal + + : + int
+
+ + + + ?step + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.conv2d (b, ?stride, ?strides, ?padding, ?paddings, ?dilation, ?dilations)
+ + + Parameters: +
Tensor
+
+ + + + ?stride + + : + int
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?padding + + : + int
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilation + + : + int
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.conv3d (b, ?stride, ?strides, ?padding, ?paddings, ?dilation, ?dilations)
+ + + Parameters: +
Tensor
+
+ + + + ?stride + + : + int
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?padding + + : + int
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilation + + : + int
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.convTranspose1d (b, ?stride, ?padding, ?dilation, ?outputPadding)
+ + + Parameters: +
Tensor
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?outputPadding + + : + int
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.convTranspose2d (b, ?stride, ?padding, ?dilation, ?outputPadding, ?strides, ?paddings, ?dilations, ?outputPaddings)
+ + + Parameters: +
Tensor
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?outputPadding + + : + int
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + ?outputPaddings + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.convTranspose3d (b, ?stride, ?padding, ?dilation, ?outputPadding, ?strides, ?paddings, ?dilations, ?outputPaddings)
+ + + Parameters: +
Tensor
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?outputPadding + + : + int
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + ?outputPaddings + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.fullLike (value, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
scalar
+
+ + + + ?shape + + : + seq<int>
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.linspaceLike (startVal, endVal, steps, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+
+ + + + endVal + + : + float
+
+ + + + steps + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.linspaceLike (startVal, endVal, steps, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + endVal + + : + int
+
+ + + + steps + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.logspaceLike (startVal, endVal, steps, ?baseVal, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+
+ + + + endVal + + : + float
+
+ + + + steps + + : + int
+
+ + + + ?baseVal + + : + float
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.logspaceLike (startVal, endVal, steps, ?baseVal, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + endVal + + : + int
+
+ + + + steps + + : + int
+
+ + + + ?baseVal + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool2d (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool3d (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxunpool1d (indices, kernelSize, ?stride, ?padding, ?outputSize)
+ + + Parameters: +
Tensor
+
+ + + + kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?outputSize + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxunpool2d (indices, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings, ?outputSize)
+ + + Parameters: +
Tensor
+
+ + + + ?kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?outputSize + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxunpool3d (indices, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings, ?outputSize)
+ + + Parameters: +
Tensor
+
+ + + + ?kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?outputSize + + : + seq<int>
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.multinomial (numSamples, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ Number of samples to draw
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + TBDReturns a tensor where each row contains numSamples indices sampled from the multinomial probability distribution located in the corresponding row of tensor input. + ++ + Indices are ordered from left to right according to when each was sampled (first samples are placed in first column). + + If input is a vector, out is a vector of size num_samples. + + If input is a matrix with m rows, the result is an matrix of shape (m × numSamples) + + +
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randintLike (low, high, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + high + + : + int
+
+ + + + ?shape + + : + seq<int>
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor -> Tensor
+
+ + |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.toImageString (?pixelMin, ?pixelMax, ?normalize, ?gridCols, ?asciiPalette)
+ + + Parameters: +
double
+
+ + + + ?pixelMax + + : + double
+
+ + + + ?normalize + + : + bool
+
+ + + + ?gridCols + + : + int
+
+ + + + ?asciiPalette + + : + string
+
+ + + + Returns: + Tensor -> string
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ CIFAR10(path, ?url, ?train, ?transform, ?targetTransform)
+ + + Parameters: +
string
+
+ + + + ?url + + : + string
+
+ + + + ?train + + : + bool
+
+ + + + ?transform + + : + Tensor -> Tensor
+
+ + + + ?targetTransform + + : + Tensor -> Tensor
+
+ + + + Returns: + CIFAR10
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classNames
+ + + + Returns: + string[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classes
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ CIFAR100(path, ?url, ?train, ?transform, ?targetTransform)
+ + + Parameters: +
string
+
+ + + + ?url + + : + string
+
+ + + + ?train + + : + bool
+
+ + + + ?transform + + : + Tensor -> Tensor
+
+ + + + ?targetTransform + + : + Tensor -> Tensor
+
+ + + + Returns: + CIFAR100
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classNames
+ + + + Returns: + string[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classes
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ DataLoader(dataset, batchSize, ?shuffle, ?dropLast, ?device, ?dtype, ?backend, ?targetDevice, ?targetDtype, ?targetBackend)
+ + + Parameters: +
Dataset
+
+ + + + batchSize + + : + int
+
+ + + + ?shuffle + + : + bool
+
+ + + + ?dropLast + + : + bool
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + ?targetDevice + + : + Device
+
+ + + + ?targetDtype + + : + Dtype
+
+ + + + ?targetBackend + + : + Backend
+
+ + + + Returns: + DataLoader
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.length
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents a dataset. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + imax + + : + int option
+
+ + + + Returns: + DatasetSubset
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.length
+ + + + Returns: + int
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.loader (batchSize, ?shuffle, ?dropLast, ?device, ?dtype, ?backend, ?targetDevice, ?targetDtype, ?targetBackend)
+ + + Parameters: +
int
+
+ + + + ?shuffle + + : + bool
+
+ + + + ?dropLast + + : + bool
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + ?targetDevice + + : + Device
+
+ + + + ?targetDtype + + : + Dtype
+
+ + + + ?targetBackend + + : + Backend
+
+ + + + Returns: + DataLoader
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ DatasetSubset(dataset, indices)
+ + + Parameters: +
Dataset
+
+ + + + indices + + : + int[]
+
+ + + + Returns: + DatasetSubset
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains auto-opened utilities related to the Furnace programming model. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ download url localFileName
+ + + Parameters: +
string
+
+ + + + localFileName + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ extractTarGz fileName outputDir
+ + + Parameters: +
string
+
+ + + + outputDir + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ extractTarStream stream outputDir
+ + + Parameters: +
Stream
+
+ + + + outputDir + + : + string
+
+ + + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ ImageDataset(path, ?fileExtension, ?resize, ?transform, ?targetTransform)
+ + + Parameters: +
string
+
+ + + + ?fileExtension + + : + string
+
+ + + + ?resize + + : + int * int
+
+ + + + ?transform + + : + Tensor -> Tensor
+
+ + + + ?targetTransform + + : + Tensor -> Tensor
+
+ + + + Returns: + ImageDataset
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classNames
+ + + + Returns: + string[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classes
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ MNIST(path, ?urls, ?train, ?transform, ?targetTransform, ?n)
+ + + Parameters: +
string
+
+ + + + ?urls + + : + seq<string>
+
+ + + + ?train + + : + bool
+
+ + + + ?transform + + : + Tensor -> Tensor
+
+ + + + ?targetTransform + + : + Tensor -> Tensor
+
+ + + + ?n + + : + int
+
+ + + + Returns: + MNIST
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classNames
+ + + + Returns: + string[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.classes
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TensorDataset(data, target)
+ + + Parameters: + + + + Returns: + TensorDataset
+
+ + |
+
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TextDataset(text, seqLength, ?chars)
+ + + Parameters: +
string
+
+ + + + seqLength + + : + int
+
+ + + + ?chars + + : + string
+
+ + + + Returns: + TextDataset
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.charToIndex c
+ + + Parameters: +
char
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.chars
+ + + + Returns: + char[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.indexToChar i
+ + + Parameters: +
int
+
+ + + + Returns: + char
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.numChars
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.tensorToText tensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.textToTensor text
+ + + Parameters: +
string
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Contains datasets and components related to data loading. +
++ Type/Module + | ++ Description + | +
+ + + + CIFAR10 + + + + |
+ + + | +
+ + + + CIFAR100 + + + + |
+ + + | +
+ + + + DataLoader + + + + |
+ + + | +
+ + + + Dataset + + + + |
+ + + | +
+ + + + DatasetSubset + + + + |
+ + + | +
+ + + + DataUtil + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains auto-opened utilities related to the Furnace programming model. + + + |
+
+ + + + ImageDataset + + + + |
+ + + | +
+ + | ++ + | +
+ + + + TensorDataset + + + + |
+ + + | +
+ + + + TextDataset + + + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ + Represents a device specification. + +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Device(DeviceType, int)
+ + + Parameters: +
DeviceType
+
+ + + + Item2 + + : + int
+
+ + + |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.DeviceIndex
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains functions and settings related to device specifications. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Get or set the default device used when creating tensors. Note, use
|
+
© Copyright 2025, Furnace Contributors.
++ + Represents the type of a device. + +
++ + The numeric values used are as for LibTorch. + +
++ Record Field + | ++ Description + | +
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
© Copyright 2025, Furnace Contributors.
++ Represents a Bernoulli distribution. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents a Categorial distribution. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents a distribution. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.logprob arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + Tensor
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.sample ()
+ + + + Returns: + 'T
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents an Empirical distribution. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Empirical(values, ?weights, ?logWeights, ?combineDuplicates, ?device, ?dtype, ?backend)
+ + + Parameters: +
seq<'T>
+
+ + + + ?weights + + : + Tensor
+
+ + + + ?logWeights + + : + Tensor
+
+ + + + ?combineDuplicates + + : + bool
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Empirical<'T>
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + finish + + : + int option
+
+ + + + Returns: + Empirical<'T>
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.[i]
+ + + Parameters: +
int
+
+ + + + Returns: + 'T * Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.filter predicate
+ + + Parameters: +
'T -> bool
+
+ + + + Returns: + Empirical<'T>
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isWeighted
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.length
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.map f
+ + + Parameters: +
'T -> 'a
+
+ + + + Returns: + Empirical<'a>
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.mode
+ + + + Returns: + 'T
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.resample (numSamples, ?minIndex, ?maxIndex)
+ + + Parameters: +
int
+
+ + + + ?minIndex + + : + int
+
+ + + + ?maxIndex + + : + int
+
+ + + + Returns: + Empirical<'T>
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.sample (?minIndex, ?maxIndex)
+ + + Parameters: +
int
+
+ + + + ?maxIndex + + : + int
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.thin (numSamples, ?minIndex, ?maxIndex)
+ + + Parameters: +
int
+
+ + + + ?minIndex + + : + int
+
+ + + + ?maxIndex + + : + int
+
+ + + + Returns: + Empirical<'T>
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.values
+ + + + Returns: + 'T[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents a normal distribution with the given mean and standard deviation with the mean and standard deviation drawn fom the given tensors. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.sample numSamples
+ + + Parameters: +
int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents a uniform distribution with low and high values drawn from the given tensors. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Contains types and functionality related to probabilitity distributions. +
++ Type + | ++ Description + | +
+ + + + Bernoulli + + + + |
+ + + | +
+ + + + Categorical + + + + |
+ + + | +
+ + + + Distribution<'T> + + + + |
+ + + | +
+ + + + Empirical<'T> + + + + |
+ + + | +
+ + + + Normal + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Represents a normal distribution with the given mean and standard deviation with the mean and standard deviation drawn fom the given tensors. + + |
+
+ + + + TensorDistribution + + + + |
+ + + | +
+ + + + Uniform + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Represents a uniform distribution with low and high values drawn from the given tensors. + + |
+
© Copyright 2025, Furnace Contributors.
++ + Represents a storage type for elements of a tensor + +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ BFloat16
+ + + |
+
+
+
+
+ ![]() ![]() + + Store elements as 16-bit floating point numbers (bfloat16 variation) + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + Store elements as booleans + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + Store elements as 8-bit unsigned integers + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Float16
+ + + |
+
+
+
+
+ ![]() ![]() + + Store elements as 16-bit floating point numbers + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Float32
+ + + |
+
+
+
+
+ ![]() ![]() + + Store elements as 32-bit floating point numbers + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Float64
+ + + |
+
+
+
+
+ ![]() ![]() + + Store elements as 64-bit floating point numbers + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + Store elements as 16-bit signed integers + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + Store elements as 32-bit signed integers + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + Store elements as 64-bit signed integers + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + Store elements as 8-bit integers + + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets the natural result of the Sum(), SumToSize() and Sum(dim) operation on this dtype + + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains global functions and settings related to tensor element types, used when writing backends. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ opNotSupported msg dtype
+ + + Parameters: +
string
+
+ + + + dtype + + : + Dtype
+
+ + + + Returns: + 's
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Raise an exception indicating the given operation is not supported for the given tensor element type. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Raise an exception indicating the given binary operation is not supported for the two given tensor element types. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ opNotSupportedOnDeviceType msg dtype deviceType
+ + + Parameters: +
string
+
+ + + + dtype + + : + Dtype
+
+ + + + deviceType + + : + DeviceType
+
+ + + + Returns: + 'a
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Raise an exception indicating the given operation is not supported for the given tensor device type. + + +
|
+
+ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsFloatingPoint
+ + + Parameters: +
unit
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsFloatingPoint
+ + + + Returns: + bool
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsIntegral
+ + + Parameters: +
unit
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsIntegral
+ + + + Returns: + bool
+
+ + |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains functions and settings related to tensor element types + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Get or set the default element type used when creating tensors. Only floating point types are supported as the default type. Note, use
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Find the Dtype which would result from dividing tensors with dtype1 and dtype2 + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+ Active pattern + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|FloatingPoint|_|) x
+ + + Parameters: +
Dtype
+
+ + + + Returns: + unit option
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|IntegralOrBool|_|) x
+ + + Parameters: +
Dtype
+
+ + + + Returns: + unit option
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|Integral|_|) x
+ + + Parameters: +
Dtype
+
+ + + + Returns: + unit option
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Tensor operations + +
++ Static member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+ + The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.arange (endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The ending value for the set of points.
+
+ + + + ?startVal + + : + int
+ -
+ The starting value for the set of points. Default: 0.
+
+ + + + ?step + + : + int
+ -
+ The gap between each pair of adjacent points. Default: 1.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a 1-D tensor of size \(\left\lceil \frac{\text{end} - \text{start}}{\text{step}} \right\rceil\) + with values from the interval [start, end) taken with common difference step beginning from start. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.arange (endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+ -
+ The ending value for the set of points.
+
+ + + + ?startVal + + : + float
+ -
+ The starting value for the set of points. Default: 0.
+
+ + + + ?step + + : + float
+ -
+ The gap between each pair of adjacent points. Default: 1.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a 1-D tensor of size \(\left\lceil \frac{\text{end} - \text{start}}{\text{step}} \right\rceil\) + with values from the interval [start, end) taken with common difference step beginning from start. + + ++ + Non-integer steps may be subject to floating point rounding errors when comparing against end. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.arangeLike (input, endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + endVal + + : + int
+ -
+ The ending value for the set of points.
+
+ + + + ?startVal + + : + int
+ -
+ The starting value for the set of points. Default: 0.
+
+ + + + ?step + + : + int
+ -
+ The gap between each pair of adjacent points. Default: 1.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + A version of FurnaceImage.arange with characteristics based on the input tensor. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.arangeLike (input, endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + endVal + + : + float
+ -
+ The ending value for the set of points.
+
+ + + + ?startVal + + : + float
+ -
+ The starting value for the set of points. Default: 0.
+
+ + + + ?step + + : + float
+ -
+ The gap between each pair of adjacent points. Default: 1.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + A version of FurnaceImage.arange with characteristics based on the input tensor. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.argmax (input, dim, ?keepDim)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the indices of the maximum value of all elements in the input tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.argmax input
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the indices of the maximum value of all elements in the input tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.argmin (input, dim, ?keepDim)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the indices of the minimum value of all elements in the input tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.argmin input
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the indices of the minimum value of all elements in the input tensor. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the list of available backends and devices available for each backend. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.bceLoss (input, target, ?weight, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + target + + : + Tensor
+ -
+ The target tensor.
+
+ + + + ?weight + + : + Tensor
+ -
+ A manual rescaling weight given to the loss of each batch element.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Creates a criterion that measures the Binary Cross Entropy between the target and the output + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.bernoulli (probs, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The input tensor of probability values for the Bernoulli distribution.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+ + If the element type is unchanged the input tensor will be returned. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Concatenates the given sequence of seq tensors in the given dimension. All tensors must either have the same shape (except in the concatenating dimension) or be empty. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the ceil of the elements of input, the smallest integer greater than or equal to each element. + ++ The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.clamp (input, ?low, ?high)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?low + + : + scalar
+ -
+ The lower-bound of the range to be clamped to.
+
+ + + + ?high + + : + scalar
+ -
+ The upper-bound of the range to be clamped to.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Clamp all elements in input into the range [ low..high] and return a resulting tensor + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the same characteristics and storage cloned. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Configure the default device, element type, backend, printer. Only floating point dtypes are supported as the default. + + |
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Return the current default device, element type, backend, and printer. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.config (?device, ?dtype, ?backend, ?printer)
+ + + Parameters: +
Device
+ -
+ The new default device.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The new default element type. Only floating point dtypes are supported as the default.
+
+ + + + ?backend + + : + Backend
+ -
+ The new default backend.
+
+ + + + ?printer + + : + Printer
+ -
+ The new default printer.
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.conv1d (input, filters, ?stride, ?padding, ?dilation)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + filters + + : + Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit paddings on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D convolution over an input signal composed of several input planes + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.conv2d (input, filters, ?stride, ?strides, ?padding, ?paddings, ?dilation, ?dilations)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + filters + + : + Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on corresponding sides of the input.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D convolution over an input signal composed of several input planes + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.conv3d (input, filters, ?stride, ?strides, ?padding, ?paddings, ?dilation, ?dilations)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + filters + + : + Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on corresponding sides of the input.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D convolution over an input signal composed of several input planes + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.convTranspose1d (input, filters, ?stride, ?padding, ?dilation, ?outputPadding)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + filters + + : + Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?outputPadding + + : + int
+ -
+ The additional size added to one side of each dimension in the output shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.convTranspose2d (input, filters, ?stride, ?padding, ?dilation, ?outputPadding, ?strides, ?paddings, ?dilations, ?outputPaddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + filters + + : + Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?outputPadding + + : + int
+ -
+ The additional size added to one side of each dimension in the output shape.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + ?outputPaddings + + : + seq<int>
+ -
+ The additional sizes added to one side of each dimension in the output shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.convTranspose3d (input, filters, ?stride, ?padding, ?dilation, ?outputPadding, ?strides, ?paddings, ?dilations, ?outputPaddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + filters + + : + Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?outputPadding + + : + int
+ -
+ The additional size added to one side of each dimension in the output shape.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + ?outputPaddings + + : + seq<int>
+ -
+ The additional sizes added to one side of each dimension in the output shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.corrcoef input
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + Returns: + Tensor
+
+
+ The correlation coefficient matrix \(R\) is computed from the covariance
+ matrix
+ Returns a square tensor representing the correlation coefficient matrix.
+ Given a tensor with \(N\) variables \(X=[x_1,x_2,\ldots,x_N]\) the
+ \(R_{i,j}\) entry on the correlation matrix is the correlation between
+ \(x_i\) and \(x_j\).
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Estimates the Pearson correlation coefficient matrix for the given tensor. The tensor's first + dimension should index variables and the second dimension should + index observations for each variable. + + ++ + The correlation between variables \(x\) and \(y\) is + \[cor(x,y)= \frac{\sum^{N}_{i = 1}(x_{i} - \mu_x)(y_{i} - \mu_y)}{\sigma_x \sigma_y (N ~-~1)}\] + where \(\mu_x\) and \(\mu_y\) are the sample means and \(\sigma_x\) and \(\sigma_x\) are + the sample standard deviations. + + +
+ Example +++ + let x = FurnaceImage.tensor([-0.2678; -0.0908; -0.3766; 0.2780]) + let y = FurnaceImage.tensor([-0.5812; 0.1535; 0.2387; 0.2350]) + let xy = FurnaceImage.stack([x;y]) + FurnaceImage.corrcoef(xy)+ Evaluates to + + tensor([[1.0000, 0.3582], + [0.3582, 1.0000]])+ + |
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the hyperbolic cosine of the elements of input. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.cov (input, ?correction, ?fweights, ?aweights)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?correction + + : + int64
+ -
+ Difference between the sample size and the sample degrees of freedom. Defaults to 1 (Bessel's correction).
+
+ + + + ?fweights + + : + Tensor
+ -
+ Frequency weights represent the number of times each observation was observed.
+ Should be given as a tensor of integers. Defaults to no weights.
+
+ + + + ?aweights + + : + Tensor
+ -
+ Relative importance weights, larger weights for observations that
+ should have a larger effect on the estimate.
+ Should be given as a tensor of floating point numbers. Defaults to no weights.
+
+ + + + Returns: + Tensor
+
+ Returns a square tensor representing the covariance matrix.
+ Given a tensor with \(N\) variables \(X=[x_1,x_2,\ldots,x_N]\) the
+ \(C_{i,j}\) entry on the covariance matrix is the covariance between
+ \(x_i\) and \(x_j\).
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Estimates the covariance matrix of the given tensor. The tensor's first + dimension should index variables and the second dimension should + index observations for each variable. + + +
+
+ If no weights are given, the covariance between variables \(x\) and \(y\) is
+ \[cov(x,y)= \frac{\sum^{N}_{i = 1}(x_{i} - \mu_x)(y_{i} - \mu_y)}{N~-~\text{correction}}\]
+ where \(\mu_x\) and \(\mu_y\) are the sample means.
+
+ If there are fweights or aweights then the covariance is
+ \[cov(x,y)=\frac{\sum^{N}_{i = 1}w_i(x_{i} - \mu_x^*)(y_{i} - \mu_y^*)}{\text{normalization factor}}\]
+ where \(w\) is either fweights or aweights if one weight type is provided.
+ If both weight types are provided \(w=\text{fweights}\times\text{aweights}\).
+ \(\mu_x^* = \frac{\sum^{N}_{i = 1}w_ix_{i} }{\sum^{N}_{i = 1}w_i}\)
+ is the weighted mean of variables.
+ The normalization factor is \(\sum^{N}_{i=1} w_i\) if only fweights are provided or if aweights are provided and
+ Example +++ + let x = FurnaceImage.tensor([0.0;3.4;5.0]) + let y = FurnaceImage.tensor([1.0;2.3;-3.0]) + let xy = FurnaceImage.stack([x;y]) + xy.cov()+ Evaluates to + + tensor([[ 6.5200, -4.0100], + [-4.0100, 7.6300]])+ + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.create count value
+ + + Parameters: +
int
+ -
+ The number of elements in the tensor.
+
+ + + + value + + : + 'a
+ -
+ The initial value for each element of the tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.crossEntropyLoss (input, target, ?weight, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + target + + : + Tensor
+ -
+ The target tensor.
+
+ + + + ?weight + + : + Tensor
+ -
+ A optional manual rescaling weight given to the loss of each batch element.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+ + | +
+
+
+
|
+
+ + | ++ + + + | +
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.devices (?backend, ?deviceType)
+ + + Parameters: +
Backend
+ -
+ Return information for this backend. Defaults to Backend.Default.
+
+ + + + ?deviceType + + : + DeviceType
+ -
+ If given, only return devices for this device type.
+
+ + + + Returns: + Device list
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.diagonal (input, ?offset, ?dim1, ?dim2)
+ + + Parameters: +
Tensor
+ -
+ The input tensor. Must be at least 2-dimensional.
+
+ + + + ?offset + + : + int
+ -
+ Which diagonal to consider. Default: 0.
+
+ + + + ?dim1 + + : + int
+ -
+ The first dimension with respect to which to take diagonal. Default: 0..
+
+ + + + ?dim2 + + : + int
+ -
+ The second dimension with respect to which to take diagonal. Default: 1.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor with the diagonal elements with respect to
|
+
+ + | +
+
+
+
|
+
+ + | +
+
+
+
|
+
+ + | +
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Dilate the tensor in using the given dilations in each corresponding dimension. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+ + | +
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Randomly zeroes some of the elements of the input tensor with probability p using samples from a Bernoulli distribution + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Randomly zero out entire channels (a channel is a 2D feature map, e.g., the jj -th channel of the ii -th sample in the batched input is a 2D tensor \text{input}[i, j]input[i,j] ). Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Randomly zero out entire channels (a channel is a 3D feature map, e.g., the jj -th channel of the ii -th sample in the batched input is a 3D tensor \text{input}[i, j]input[i,j] ). Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.empty (?device, ?dtype, ?backend)
+ + + Parameters: +
Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new empty tensor holding no data, for the given element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.empty (length, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The length of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new uninitialized tensor filled with arbitrary values for the given length, element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.empty (shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new uninitialized tensor filled with arbitrary values for the given shape, element type and configuration + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean tensor for the element-wise equality comparison of the elements in the two tensors. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+ + | ++ + + + | +
+ + | +
+
+
+
|
+
+ + | ++ + + + | +
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new view of the input tensor with singleton dimensions expanded to a larger size + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.eye (rows, ?cols, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The number of rows
+
+ + + + ?cols + + : + int
+ -
+ The number of columns with default being n
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | +
+
+
+
|
+
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | +
+
+
+ The |
+
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | ++ + + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.fjacobianTv f x v
+ + + Parameters: +
Tensor -> Tensor
+ -
+ vector-to-vector function
+
+ + + + x + + : + Tensor
+ -
+ Point at which the function f will be evaluated, it must have a single dimension.
+
+ + + + v + + : + Tensor
+ -
+ Vector
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Original value and transposed Jacobian-vector product of a vector-to-vector function `f`, at point `x`, along vector `v` + + |
+
+ + | +
+
+
+ The |
+
+ + | ++ + + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the floor of the elements of input, the largest integer less than or equal to each element. + ++ The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor suitable for calculating the forward-mode derivative at the given level tag. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.full (length, value, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The length of the returned tensor.
+
+ + + + value + + : + scalar
+ -
+ The scalar giving the the initial values for the tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor of the given length filled with value, for the given element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.full (shape, value, ?device, ?dtype, ?backend)
+ + + Parameters: +
seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + value + + : + scalar
+ -
+ The scalar used to form the initial values for the tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor filled with the scalar value, for the given shape, element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.fullLike (input, value, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + value + + : + scalar
+ -
+ The scalar giving the the initial values for the tensor.
+
+ + + + ?shape + + : + seq<int>
+ -
+ The desired shape of returned tensor. Default: If None, the shape of the input tensor is used.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor filled with the given scalar value with characteristics based on the input tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.gather (input, dim, indices)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The axis along which to index.
+
+ + + + indices + + : + Tensor
+ -
+ The the indices of elements to gather.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean tensor for the element-wise greater-than-or-equal comparison of the elements in the two tensors. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+ + | +
+
+
+
|
+
+ + | ++ + + + | +
+ + | ++ + + + | +
+ + | +
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean tensor for the element-wise greater-than comparison of the elements in the two tensors. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.hasinf input
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean indicating if any element of the tensor is infinite. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.hasnan input
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean indicating if any element of the tensor is a not-a-number (NaN) value. + +
|
+
+ + | +
+
+
+
|
+
+ + | +
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.init count initializer
+ + + Parameters: +
int
+ -
+ The length of the tensor.
+
+ + + + initializer + + : + int -> 'a
+ -
+ The function used to initialize each element.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Create a new 1D tensor using the given initializer for each element. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.init2d length1 length2 initializer
+ + + Parameters: +
int
+ -
+ The length of the tensor in the first dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the tensor in the second dimension.
+
+ + + + initializer + + : + int -> int -> 'a
+ -
+ The function used to initialize each element.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Create a new 2D tensor using the given initializer for each element. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.init3d length1 length2 length3 initializer
+ + + Parameters: +
int
+ -
+ The length of the tensor in the 1st dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the tensor in the 2nd dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the tensor in the 3rd dimension.
+
+ + + + initializer + + : + int -> int -> int -> 'a
+ -
+ The function used to initialize each element.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Create a new 3D tensor using the given initializer for each element. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.init4d length1 length2 length3 length4 initializer
+ + + Parameters: +
int
+ -
+ The length of the tensor in the 1st dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the tensor in the 2nd dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the tensor in the 3rd dimension.
+
+ + + + length4 + + : + int
+ -
+ The length of the tensor in the 4th dimension.
+
+ + + + initializer + + : + int -> int -> int -> int -> 'a
+ -
+ The function used to initialize each element.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Create a new 4D tensor using the given initializer for each element. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.isBackendAvailable backend
+ + + Parameters: +
Backend
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.isCudaAvailable ?backend
+ + + Parameters: +
Backend
+ -
+ Return information for this backend. Defaults to Backend.Default.
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.isDeviceTypeAvailable (deviceType, ?backend)
+ + + Parameters: +
DeviceType
+ -
+ The requested device type.
+
+ + + + ?backend + + : + Backend
+ -
+ Return information for this backend. Defaults to Backend.Default.
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.isTensor value
+ + + Parameters: +
obj
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean tensor where each element indicates if the corresponding element in the input tensor is an infinity value. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean tensor where each element indicates if the corresponding element in the input tensor is a NaN (not-a-number) value. + +
|
+
+ + | +
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.jacobianTv f x v
+ + + Parameters: +
Tensor -> Tensor
+ -
+ vector-to-vector function
+
+ + + + x + + : + Tensor
+ -
+ Point at which the function f will be evaluated, it must have a single dimension.
+
+ + + + v + + : + Tensor
+ -
+ Vector
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Transposed Jacobian-vector product of a vector-to-vector function `f`, at point `x`, along vector `v` + +
|
+
+ + | +
+
+
+
|
+
+ + | +
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Return a boolean tensor for the element-wise less-than-or-equal comparison of the elements in the two tensors. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+
+
+
+
+
+
+ |
+
+
+ + \[\text{LeakyReLU}(x) = \max(0, x) + \text{negative\_slope} * \min(0, x)\] + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.like (input, value, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + value + + : + obj
+ -
+ The .NET object giving the the initial values for the tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor based on the given .NET value with characteristics based on the input tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.linspace (startVal, endVal, steps, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The starting value for the set of points.
+
+ + + + endVal + + : + int
+ -
+ The ending value for the set of points.
+
+ + + + steps + + : + int
+ -
+ The size of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a 1-D tensor of size steps whose values are evenly spaced from startVal to endVal. The values are going to be: \( + (\text{startVal}, + \text{startVal} + \frac{\text{endVal} - \text{startVal}}{\text{steps} - 1}, + \ldots, + \text{startVal} + (\text{steps} - 2) * \frac{\text{endVal} - \text{startVal}}{\text{steps} - 1}, + \text{endVal}) + \) + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.linspace (startVal, endVal, steps, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+ -
+ The starting value for the set of points.
+
+ + + + endVal + + : + float
+ -
+ The ending value for the set of points.
+
+ + + + steps + + : + int
+ -
+ The size of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a 1-D tensor of size steps whose values are evenly spaced from startVal to endVal. The values are going to be: \( + (\text{startVal}, + \text{startVal} + \frac{\text{endVal} - \text{startVal}}{\text{steps} - 1}, + \ldots, + \text{startVal} + (\text{steps} - 2) * \frac{\text{endVal} - \text{startVal}}{\text{steps} - 1}, + \text{endVal}) + \) + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.load fileName
+ + + Parameters: +
string
+
+ + + + Returns: + 'b
+
+ + |
+
+
+ + + The format used may change from version to version of Furnace. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the natural logarithm of the elements of input. + ++ \[y_{i} = \log_{e} (x_{i})\] + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the logarithm to the base 10 of the elements of input. + ++ \[y_{i} = \log_{10} (x_{i})\] + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.logspace (startVal, endVal, steps, ?baseVal, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The starting value for the set of points.
+
+ + + + endVal + + : + int
+ -
+ The ending value for the set of points.
+
+ + + + steps + + : + int
+ -
+ The size of the returned tensor.
+
+ + + + ?baseVal + + : + int
+ -
+ The base of the logarithm. Default: 10.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a 1-D tensor of size steps whose values are evenly spaced logarithmically from \(\text{baseVal}^{\text{startVal}}\) to \(\text{baseVal}^{\text{endVal}}\). The values are going to be: \( + (\text{baseVal}^{\text{startVal}}, + \text{baseVal}^{(\text{startVal} + \frac{\text{endVal} - \text{startVal}}{ \text{steps} - 1})}, + \ldots, + \text{baseVal}^{(\text{startVal} + (\text{steps} - 2) * \frac{\text{endVal} - \text{startVal}}{ \text{steps} - 1})}, + \text{baseVal}^{\text{endVal}}) + \) + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.logspace (startVal, endVal, steps, ?baseVal, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+ -
+ The starting value for the set of points.
+
+ + + + endVal + + : + float
+ -
+ The ending value for the set of points.
+
+ + + + steps + + : + int
+ -
+ The size of the returned tensor.
+
+ + + + ?baseVal + + : + float
+ -
+ The base of the logarithm. Default: 10.0.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a 1-D tensor of size steps whose values are evenly spaced logarithmically from \(\text{baseVal}^{\text{startVal}}\) to \(\text{baseVal}^{\text{endVal}}\). The values are going to be: \( + (\text{baseVal}^{\text{startVal}}, + \text{baseVal}^{(\text{startVal} + \frac{\text{endVal} - \text{startVal}}{ \text{steps} - 1})}, + \ldots, + \text{baseVal}^{(\text{startVal} + (\text{steps} - 2) * \frac{\text{endVal} - \text{startVal}}{ \text{steps} - 1})}, + \text{baseVal}^{\text{endVal}}) + \) + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.logsumexp (input, dim, ?keepDim)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean tensor for the element-wise less-than comparison of the elements in the two tensors. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor by mapping a function over all elements of the input tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.map2 mapping tensor1 tensor2
+ + + Parameters: +
Tensor -> Tensor -> Tensor
+ -
+ The function to apply to each element of the tensor.
+
+ + + + tensor1 + + : + Tensor
+ -
+ The first input tensor.
+
+ + + + tensor2 + + : + Tensor
+ -
+ The second input tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor by mapping a function over all corresponding elements of two input tensors. + ++ The shapes of the two tensors must be identical. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.map3 mapping tensor1 tensor2 tensor3
+ + + Parameters: +
Tensor -> Tensor -> Tensor -> Tensor
+ -
+ The function to apply to each element of the tensor.
+
+ + + + tensor1 + + : + Tensor
+ -
+ The first input tensor.
+
+ + + + tensor2 + + : + Tensor
+ -
+ The second input tensor.
+
+ + + + tensor3 + + : + Tensor
+ -
+ The third input tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor by mapping a function over all corresponding elements of three input tensors. + ++ The shapes of the three tensors must be identical. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.mapi mapping tensor
+ + + Parameters: +
int[] -> Tensor -> Tensor
+ -
+ The function is passed the index of each element. The function to apply to each element of the tensor.
+
+ + + + tensor + + : + Tensor
+ -
+ The input tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor by mapping a function over all elements of the input tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.mapi2 mapping tensor1 tensor2
+ + + Parameters: +
int[] -> Tensor -> Tensor -> Tensor
+ -
+ The function to apply to each element of the tensor.
+
+ + + + tensor1 + + : + Tensor
+ -
+ The first input tensor.
+
+ + + + tensor2 + + : + Tensor
+ -
+ The second input tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor by mapping a function over all corresponding elements of two input tensors. + ++ The function is passed the index of each element. The shapes of the two tensors must be identical. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.mapi3 mapping tensor1 tensor2 tensor3
+ + + Parameters: +
int[] -> Tensor -> Tensor -> Tensor -> Tensor
+ -
+ The function to apply to each element of the tensor.
+
+ + + + tensor1 + + : + Tensor
+ -
+ The first input tensor.
+
+ + + + tensor2 + + : + Tensor
+ -
+ The second input tensor.
+
+ + + + tensor3 + + : + Tensor
+ -
+ The third input tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor by mapping a function over all corresponding elements of three input tensors. + ++ The function is passed the index of each element. The shapes of the three tensors must be identical. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the maximum value of all elements in the input tensor along the given dimension. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Each element of the tensor input is compared with the corresponding element of the tensor other and an element-wise maximum is taken. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool1d (input, kernelSize, ?stride, ?padding)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D max pooling over an input signal composed of several input planes. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool1di (input, kernelSize, ?stride, ?padding)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D max pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool2d (input, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D max pooling over an input signal composed of several input planes. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool2di (input, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D max pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool3d (input, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSizes.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D max pooling over an input signal composed of several input planes. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxpool3di (input, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D max pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxunpool1d (input, indices, kernelSize, ?stride, ?padding, ?outputSize)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + indices + + : + Tensor
+ -
+ The indices selected by maxpool1di.
+
+ + + + kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?outputSize + + : + seq<int>
+ -
+ The targeted output size.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxunpool2d (input, indices, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings, ?outputSize)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + indices + + : + Tensor
+ -
+ The indices selected by maxpool2di.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSizes.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + ?outputSize + + : + seq<int>
+ -
+ The targeted output size.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.maxunpool3d (input, indices, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings, ?outputSize)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + indices + + : + Tensor
+ -
+ The indices selected by maxpool3di.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSizes.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + ?outputSize + + : + seq<int>
+ -
+ The targeted output size.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.mean (input, dim, ?keepDim)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the mean value of each row of the input tensor in the given dimension dim. If dim is a list of dimensions, reduce over all of them. + ++ + If keepdim is true, the output tensor is of the same size as input except in the dimension(s) dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 (or len(dim)) fewer dimension(s). + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the minimum value of all elements in the input tensor along the given dimension. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Each element of the tensor input is compared with the corresponding element of the tensor other and an element-wise minimum is taken. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.move (input, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Move the tensor to a difference device, backend and/or change its element type. + ++ If the characteristics are unchanged the input tensor will be returned. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.mseLoss (input, target, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + target + + : + Tensor
+ -
+ The target tensor.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Creates a criterion that measures the mean squared error (squared L2 norm) between each element in the input and the target. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.multinomial (probs, numSamples, ?normalize, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The input tensor containing probabilities.
+
+ + + + numSamples + + : + int
+ -
+ The number of samples to draw.
+
+ + + + ?normalize + + : + bool
+ -
+ Indicates where the probabilities should first be normalized by their sum.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor where each row contains numSamples indices sampled from the multinomial probability distribution located in the corresponding row of tensor input. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a boolean tensor for the element-wise non-equality comparison of the elements in the two tensors. + ++ The shapes of input and other don’t need to match, but they must be broadcastable. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.nelement input
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.nest level
+ + + Parameters: +
uint32
+ -
+ The new nesting level.
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.nest ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.nestLevel ()
+ + + + Returns: + uint32
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.nestReset ()
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Reset the global nesting level for automatic differentiation to zero. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.nllLoss (input, target, ?weight, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + target + + : + Tensor
+ -
+ The target tensor.
+
+ + + + ?weight + + : + Tensor
+ -
+ A optional manual rescaling weight given to the loss of each batch element.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Normalizes a vector so all the values are between zero and one (min-max scaling to 0..1). + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.one (?device, ?dtype, ?backend)
+ + + Parameters: +
Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.oneLike (input, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the '0' scalar tensor with characteristics based on the input tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.onehot (length, hot, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The length of the returned tensor.
+
+ + + + hot + + : + int
+ -
+ The location to set to 1.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a one-hot tensor, with one location set to 1, and all others 0. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.onehotLike (input, length, hot, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + length + + : + int
+ -
+ The length of the returned tensor.
+
+ + + + hot + + : + int
+ -
+ The location to set to 1.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + A version of FurnaceImage.onehot with characteristics based on the input tensor. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.ones (length, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The length of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor of the given length filled with '1' values for the given element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.ones (shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor filled with '1' values for the given shape, element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.onesLike (input, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + ?shape + + : + seq<int>
+ -
+ The desired shape of returned tensor. Default: If None, the shape of the input tensor is used.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor filled with '1' values with characteristics based on the input tensor. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.rand (length, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The length of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random numbers from a uniform distribution on the interval [0, 1) + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.rand (shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random numbers from a uniform distribution on the interval [0, 1) + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randLike (input, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + ?shape + + : + seq<int>
+ -
+ The desired shape of returned tensor. Default: If None, the shape of the input tensor is used.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random numbers from a uniform distribution on the interval [0, 1) with characteristics based on the input tensor + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randint (low, high, length, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ Lowest integer to be drawn from the distribution. Default: 0..
+
+ + + + high + + : + int
+ -
+ One above the highest integer to be drawn from the distribution.
+
+ + + + length + + : + int
+ -
+ The length of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random integers generated uniformly between low (inclusive) and high (exclusive). + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randint (low, high, shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ Lowest integer to be drawn from the distribution. Default: 0..
+
+ + + + high + + : + int
+ -
+ One above the highest integer to be drawn from the distribution.
+
+ + + + shape + + : + seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random integers generated uniformly between low (inclusive) and high (exclusive). + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randintLike (input, low, high, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + low + + : + int
+ -
+ Lowest integer to be drawn from the distribution. Default: 0..
+
+ + + + high + + : + int
+ -
+ One above the highest integer to be drawn from the distribution.
+
+ + + + ?shape + + : + seq<int>
+ -
+ The desired shape of returned tensor. Default: If None, the shape of the input tensor is used.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor with the same shape as Tensor input filled with random integers generated uniformly between low (inclusive) and high (exclusive) with characteristics based on the input tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randn (length, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The length of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random numbers from a normal distribution with mean 0 and variance 1 (also called the standard normal distribution). + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randn (shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random numbers from a normal distribution with mean 0 and variance 1 (also called the standard normal distribution). + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.randnLike (input, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + ?shape + + : + seq<int>
+ -
+ The desired shape of returned tensor. Default: If None, the shape of the input tensor is used.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor filled with random numbers from a normal distribution with mean 0 and variance 1 (also called the standard normal distribution) with characteristics based on the input tensor. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.repeat (input, dim, times)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension along which to repeat values.
+
+ + + + times + + : + int
+ -
+ The number of repetitions for each element.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Produce a new tensor suitable for calculating the reverse-mode derivative at the given level tag. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Push the given value as part of the reverse-mode computation at the given output tensor. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.reverseReset tensor
+ + + Parameters: +
Tensor
+ -
+ The output tensor.
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Reset the reverse mode computation associated with the given output tensor. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with each of the elements of input rounded to the closest integer. + ++ The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the logarithm of the tensor after clamping the tensor so that all its elements are greater than epsilon. This is to avoid a -inf result for elements equal to zero. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.save (value, fileName)
+ + + Parameters: +
obj
+
+ + + + fileName + + : + string
+
+ + + |
+
+
+ + + The format used may change from version to version of Furnace. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.scalar (value, ?device, ?dtype, ?backend)
+ + + Parameters: +
scalar
+ -
+ The scalar giving the the initial values for the tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new scalar tensor with the value value, for the given element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.scatter (input, dim, indices, destinationShape)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The axis along which to index.
+
+ + + + indices + + : + Tensor
+ -
+ The the indices of elements to gather.
+
+ + + + destinationShape + + : + seq<int>
+ -
+ The destination shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.seed ?seed
+ + + Parameters: +
int
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Seeds all backends with the given random seed, or a new seed based on the current time if no seed is specified. + +
|
+
+
+
+
+
+
+
+ |
+
+
+ + \[\text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)}\] + +
|
+
+
+
+
+
+
+ |
+
+
+ + The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the hyperbolic sine of the elements of input. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+ + Softmax is defined as: \text{Softmax}(x_{i}) = \frac{\exp(x_i)}{\sum_j \exp(x_j)}. + +
|
+
+
+
+
+
+
+
+ |
+
+
+ + \[\text{Softplus}(x) = \frac{1}{\beta} * \log(1 + \exp(\beta * x))\] + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.split (input, sizes, ?dim)
+ + + Parameters: +
Tensor
+ -
+ The tensor to split.
+
+ + + + sizes + + : + seq<int>
+ -
+ The size of a single chunk or list of sizes for each chunk.
+
+ + + + ?dim + + : + int
+ -
+ The dimension along which to split the tensor.
+
+ + + + Returns: + Tensor[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Splits the tensor into chunks. The tensor will be split into sizes.Length chunks each with a corresponding size in the given dimension. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor with all the dimensions of input of size 1 removed. + ++ If the tensor has a batch dimension of size 1, then squeeze(input) will also remove the batch dimension, which can lead to unexpected errors. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.stack (tensors, ?dim)
+ + + Parameters: +
seq<Tensor>
+ -
+ The sequence of tensors to concatenate.
+
+ + + + ?dim + + : + int
+ -
+ The dimension to insert. Has to be between 0 and the number of dimensions of concatenated tensors (inclusive).
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+ + All tensors need to be of the same size. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.std (input, dim, ?keepDim, ?unbiased)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + ?unbiased + + : + bool
+ -
+ Whether to use the unbiased estimation or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the standard deviation of each row of the input tensor in the given dimension dim. If dim is a list of dimensions, reduce over all of them. + ++ + If keepdim is true, the output tensor is of the same size as input except in the dimension(s) dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 (or len(dim)) fewer dimension(s). + If unbiased is False, then the standard deviation will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+ + + If unbiased is False, then the standard deviation will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.sum (input, dim, ?keepDim)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the sum of each row of the input tensor in the given dimension dim. If dim is a list of dimensions, reduce over all of them. + ++ + If keepdim is true, the output tensor is of the same size as input except in the dimension(s) dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 (or len(dim)) fewer dimension(s). + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the hyperbolic tangent of the elements of input. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.tensor (value, ?device, ?dtype, ?backend)
+ + + Parameters: +
obj
+ -
+ The .NET object used to form the initial values for the tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Creates a new tensor from the given data, using the given element type and configuration. + + ++ + The data is converted from arrays, sequences, lists and tuples of primitive values to a tensor whose shape is inferred from the data. + The fastest creation technique is a one dimensional array matching the desired dtype. Then use 'view' to reshape. + +
+ Example +++ + let t1 = FurnaceImage.tensor [ 1 .. 10 ] + let t2 = FurnaceImage.tensor [ [ 1.0; 3.0; 4.0 ]; + [ 1.02; 3.04; 4.01 ] ]+ + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.toImage (input, ?pixelMin, ?pixelMax, ?normalize, ?gridCols)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?pixelMin + + : + double
+ -
+ The minimum pixel value.
+
+ + + + ?pixelMax + + : + double
+ -
+ The maximum pixel value.
+
+ + + + ?normalize + + : + bool
+ -
+ If True, shift the image to the range (0, 1), by the min and max values specified by range.
+
+ + + + ?gridCols + + : + int
+ -
+ Number of columns of images in the grid.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Convert tensor to an image tensor with shape Channels x Height x Width + ++ If the input tensor has 4 dimensions, then make a single image grid. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.toImageString (input, ?pixelMin, ?pixelMax, ?normalize, ?gridCols, ?asciiPalette)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?pixelMin + + : + double
+ -
+ The minimum pixel value.
+
+ + + + ?pixelMax + + : + double
+ -
+ The maximum pixel value.
+
+ + + + ?normalize + + : + bool
+ -
+ If True, shift the image to the range (0, 1), by the min and max values specified by range.
+
+ + + + ?gridCols + + : + int
+ -
+ Number of columns of images in the grid.
+
+ + + + ?asciiPalette + + : + string
+ -
+ The ASCII pallette to use.
+
+ + + + Returns: + string
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Convert tensor to a grayscale image tensor and return a string representation approximating grayscale values + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the sum of the elements of the diagonal of the input 2-D matrix + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor that is a transposed version of input with dimensions 0 and 1 swapped. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.transpose (input, dim0, dim1)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim0 + + : + int
+ -
+ The first dimension to be transposed.
+
+ + + + dim1 + + : + int
+ -
+ The second dimension to be transposed.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor that is a transposed version of input. The given dimensions dim0 and dim1 are swapped. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Reverse the dilation of the tensor in using the given dilations in each corresponding dimension. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.unflatten (input, dim, unflattenedShape)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension to unflatten.
+
+ + + + unflattenedShape + + : + seq<int>
+ -
+ New shape of the unflattened dimenension.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with a dimension of size one inserted at the specified position + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with dimensions of size one appended to the end until the number of dimensions is the same as the other tensor. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.var (input, dim, ?keepDim, ?unbiased)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + dim + + : + int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + ?unbiased + + : + bool
+ -
+ Whether to use the unbiased estimation or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the variance of each row of the input tensor in the given dimension dim. If dim is a list of dimensions, reduce over all of them. + ++ + If keepdim is true, the output tensor is of the same size as input except in the dimension(s) dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 (or len(dim)) fewer dimension(s). + If unbiased is False, then the variance will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+ + + If unbiased is False, then the variance will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.version
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the same data as the self tensor but of a different shape. + ++ The returned tensor shares the same data and must have the same number of elements, but may have a different size. For a tensor to be viewed, the new view size must be compatible with its original size. + The returned tensor shares the same data and must have the same number of elements, but may have a different size. + For a tensor to be viewed, the new view size must be compatible with its original size and stride, i.e., each new view dimension must either be a subspace of an original dimension, + or only span across original dimensions \(d, d+1, \dots, d+kd,d+1,…,d+k\) that satisfy the following contiguity-like condition that + \(\forall i = d, \dots, d+k-1∀i=d,…,d+k−1 ,\) \[\text{stride}[i] = \text{stride}[i+1] \times \text{size}[i+1]\] + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the same data as the self tensor but of a different shape. + ++ The returned tensor shares the same data and must have the same number of elements, but may have a different size. For a tensor to be viewed, the new view size must be compatible with its original size. + The returned tensor shares the same data and must have the same number of elements, but may have a different size. + For a tensor to be viewed, the new view size must be compatible with its original size and stride, i.e., each new view dimension must either be a subspace of an original dimension, + or only span across original dimensions \(d, d+1, \dots, d+kd,d+1,…,d+k\) that satisfy the following contiguity-like condition that + \(\forall i = d, \dots, d+k-1∀i=d,…,d+k−1 ,\) \[\text{stride}[i] = \text{stride}[i+1] \times \text{size}[i+1]\] + + +
|
+
+
+
+
+
+
+
+ |
+
+
+ + The returned tensor shares the same data and must have the same number of elements, but may have a different size. For a tensor to be viewed, the new view size must be compatible with its original size. + The returned tensor shares the same data and must have the same number of elements, but may have a different size. + For a tensor to be viewed, the new view size must be compatible with its original size and stride, i.e., each new view dimension must either be a subspace of an original dimension, + or only span across original dimensions \(d, d+1, \dots, d+kd,d+1,…,d+k\) that satisfy the following contiguity-like condition that + \(\forall i = d, \dots, d+k-1∀i=d,…,d+k−1 ,\) \[\text{stride}[i] = \text{stride}[i+1] \times \text{size}[i+1]\] + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.zero (?device, ?dtype, ?backend)
+ + + Parameters: +
Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.zeroCreate count
+ + + Parameters: +
int
+ -
+ The number of elements in the tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.zeroLike (input, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the '0' scalar tensor with characteristics based on the input tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.zeros (length, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The length of the returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor filled with '0' values for the given length, element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.zeros (shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor filled with '0' values for the given shape, element type and configuration + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.zerosLike (input, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
Tensor
+ -
+ The shape and characteristics of input will determine those of the output tensor.
+
+ + + + ?shape + + : + seq<int>
+ -
+ The desired shape of returned tensor. Default: If None, the shape of the input tensor is used.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, the device of the input tensor is used.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, the element type of the input tensor is used.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, the backend of the input tensor is used.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor filled with '0' values with characteristics based on the input tensor. + +
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Tensor.loadImage (fileName, ?normalize, ?resize, ?device, ?dtype, ?backend)
+ + + Parameters: +
string
+
+ + + + ?normalize + + : + bool
+
+ + + + ?resize + + : + int * int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.loadImage (fileName, ?normalize, ?resize, ?device, ?dtype, ?backend)
+ + + Parameters: +
string
+ -
+ The file name of the image to load.
+
+ + + + ?normalize + + : + bool
+ -
+ If True, shift the image to the range (0, 1).
+
+ + + + ?resize + + : + int * int
+ -
+ An optional new size for the image.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.saveImage (fileName, ?pixelMin, ?pixelMax, ?normalize, ?resize, ?gridCols)
+ + + Parameters: +
string
+
+ + + + ?pixelMin + + : + double
+
+ + + + ?pixelMax + + : + double
+
+ + + + ?normalize + + : + bool
+
+ + + + ?resize + + : + int * int
+
+ + + + ?gridCols + + : + int
+
+ + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.saveImage (input, fileName, ?pixelMin, ?pixelMax, ?normalize, ?resize, ?gridCols)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + fileName + + : + string
+ -
+ The name of the file to save to.
+
+ + + + ?pixelMin + + : + double
+ -
+ The minimum pixel value.
+
+ + + + ?pixelMax + + : + double
+ -
+ The maximum pixel value.
+
+ + + + ?normalize + + : + bool
+ -
+ If True, shift the image to the range (0, 1), by the min and max values specified by range.
+
+ + + + ?resize + + : + int * int
+ -
+ An optional new size for the image.
+
+ + + + ?gridCols + + : + int
+ -
+ Number of columns of images in the grid.
+
+ + + |
+
+
+ + If the input tensor has 4 dimensions, then make a single image grid. + +
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ loadImage fileName resize
+ + + Parameters: +
string
+
+ + + + resize + + : + (int * int) option
+
+ + + + Returns: + float32[,,]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Loads a pixel array from a file and optionally resizes it in the process. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ saveImage pixels fileName resize
+ + + Parameters: +
float32[,,]
+
+ + + + fileName + + : + string
+
+ + + + resize + + : + (int * int) option
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Saves the given pixel array to a file and optionally resizes it in the process. Supports .png format. + + +
|
+
© Copyright 2025, Furnace Contributors.
++ Applies Batch Normalization over a 2D or 3D input (a mini-batch of 1D inputs with optional additional channel dimension) +
++
+ The mean and standard-deviation are calculated per-dimension over the mini-batches and
+ \(\gamma\( and \(\beta\) are learnable parameter vectors of size \(C\) (where \(C\) is the
+ input size). By default, the elements of \(\gamma\) are set to 1 and the elements of
+ \(\beta\) are set to 0. The standard-deviation is calculated via the biased estimator,
+ equivalent to FurnaceImage.var(input, unbiased=False)
.
+
+ Also by default, during training this layer keeps running estimates of its computed mean + and variance, which are then used for normalization during evaluation. The running estimates + are kept with a default momentum of 0.1. +
+ If trackRunningStats is set to False, this layer then does not keep running estimates, + and batch statistics are instead used during evaluation time as well. +
+ ++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ BatchNorm1d(numFeatures, ?eps, ?momentum, ?affine, ?trackRunningStats, ?reversible)
+ + + Parameters: +
int
+
+ + + + ?eps + + : + double
+
+ + + + ?momentum + + : + Tensor
+
+ + + + ?affine + + : + bool
+
+ + + + ?trackRunningStats + + : + bool
+
+ + + + ?reversible + + : + bool
+
+ + + + Returns: + BatchNorm1d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Applies Batch Normalization over a 4D input (a mini-batch of 2D inputs with optional additional channel dimension) +
++
+ The mean and standard-deviation are calculated per-dimension over the mini-batches and
+ \(\gamma\( and \(\beta\) are learnable parameter vectors of size \(C\) (where \(C\) is the
+ input size). By default, the elements of \(\gamma\) are set to 1 and the elements of
+ \(\beta\) are set to 0. The standard-deviation is calculated via the biased estimator,
+ equivalent to FurnaceImage.var(input, unbiased=False)
.
+
+ Also by default, during training this layer keeps running estimates of its computed mean + and variance, which are then used for normalization during evaluation. The running estimates + are kept with a default momentum of 0.1. +
+ If trackRunningStats is set to False, this layer then does not keep running estimates, + and batch statistics are instead used during evaluation time as well. +
+ ++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ BatchNorm2d(numFeatures, ?eps, ?momentum, ?affine, ?trackRunningStats, ?reversible)
+ + + Parameters: +
int
+
+ + + + ?eps + + : + double
+
+ + + + ?momentum + + : + Tensor
+
+ + + + ?affine + + : + bool
+
+ + + + ?trackRunningStats + + : + bool
+
+ + + + ?reversible + + : + bool
+
+ + + + Returns: + BatchNorm2d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Applies Batch Normalization over a 5D input (a mini-batch of 3D inputs with optional additional channel dimension) +
++
+ The mean and standard-deviation are calculated per-dimension over the mini-batches and
+ \(\gamma\( and \(\beta\) are learnable parameter vectors of size \(C\) (where \(C\) is the
+ input size). By default, the elements of \(\gamma\) are set to 1 and the elements of
+ \(\beta\) are set to 0. The standard-deviation is calculated via the biased estimator,
+ equivalent to FurnaceImage.var(input, unbiased=False)
.
+
+ Also by default, during training this layer keeps running estimates of its computed mean + and variance, which are then used for normalization during evaluation. The running estimates + are kept with a default momentum of 0.1. +
+ If trackRunningStats is set to False, this layer then does not keep running estimates, + and batch statistics are instead used during evaluation time as well. +
+ ++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ BatchNorm3d(numFeatures, ?eps, ?momentum, ?affine, ?trackRunningStats, ?reversible)
+ + + Parameters: +
int
+
+ + + + ?eps + + : + double
+
+ + + + ?momentum + + : + Tensor
+
+ + + + ?affine + + : + bool
+
+ + + + ?trackRunningStats + + : + bool
+
+ + + + ?reversible + + : + bool
+
+ + + + Returns: + BatchNorm3d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ A model that applies a 1D convolution over an input signal composed of several input planes +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Conv1d(inChannels, outChannels, kernelSize, ?stride, ?padding, ?dilation, ?bias)
+ + + Parameters: +
int
+
+ + + + outChannels + + : + int
+
+ + + + kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?bias + + : + bool
+
+ + + + Returns: + Conv1d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bias
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.weight
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ A model that applies a 2D convolution over an input signal composed of several input planes +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Conv2d(inChannels, outChannels, ?kernelSize, ?stride, ?padding, ?dilation, ?kernelSizes, ?strides, ?paddings, ?dilations, ?bias)
+ + + Parameters: +
int
+
+ + + + outChannels + + : + int
+
+ + + + ?kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + ?bias + + : + bool
+
+ + + + Returns: + Conv2d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bias
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.weight
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ A model that applies a 3D convolution over an input signal composed of several input planes +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Conv3d(inChannels, outChannels, ?kernelSize, ?stride, ?padding, ?dilation, ?kernelSizes, ?strides, ?paddings, ?dilations, ?bias)
+ + + Parameters: +
int
+
+ + + + outChannels + + : + int
+
+ + + + ?kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + ?bias + + : + bool
+
+ + + + Returns: + Conv3d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bias
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.weight
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ A model that applies a 1D transposed convolution operator over an input image composed of several input planes. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ ConvTranspose1d(inChannels, outChannels, kernelSize, ?stride, ?padding, ?dilation, ?bias)
+ + + Parameters: +
int
+
+ + + + outChannels + + : + int
+
+ + + + kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?bias + + : + bool
+
+ + + + Returns: + ConvTranspose1d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bias
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.weight
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ A model that applies a 2D transposed convolution operator over an input image composed of several input planes. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ ConvTranspose2d(inChannels, outChannels, ?kernelSize, ?stride, ?padding, ?dilation, ?kernelSizes, ?strides, ?paddings, ?dilations, ?bias)
+ + + Parameters: +
int
+
+ + + + outChannels + + : + int
+
+ + + + ?kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + ?bias + + : + bool
+
+ + + + Returns: + ConvTranspose2d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bias
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.weight
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ A model that applies a 3D transposed convolution operator over an input image composed of several input planes. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ ConvTranspose3d(inChannels, outChannels, ?kernelSize, ?stride, ?padding, ?dilation, ?kernelSizes, ?strides, ?paddings, ?dilations, ?bias)
+ + + Parameters: +
int
+
+ + + + outChannels + + : + int
+
+ + + + ?kernelSize + + : + int
+
+ + + + ?stride + + : + int
+
+ + + + ?padding + + : + int
+
+ + + + ?dilation + + : + int
+
+ + + + ?kernelSizes + + : + seq<int>
+
+ + + + ?strides + + : + seq<int>
+
+ + + + ?paddings + + : + seq<int>
+
+ + + + ?dilations + + : + seq<int>
+
+ + + + ?bias + + : + bool
+
+ + + + Returns: + ConvTranspose3d
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bias
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.weight
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ A model which during training, randomly zeroes some of the elements of the input tensor with probability p using samples from a Bernoulli distribution. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Dropout(?p)
+ + + Parameters: +
double
+
+ + + + Returns: + Dropout
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ A model which during training, randomly zero out entire channels. Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Dropout2d(?p)
+ + + Parameters: +
double
+
+ + + + Returns: + Dropout2d
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ A model which during training, randomly zero out entire channels. Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Dropout3d(?p)
+ + + Parameters: +
double
+
+ + + + Returns: + Dropout3d
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ A model that applies a linear transformation to the incoming data: \(y = xA^T + b\) +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Linear(inFeatures, outFeatures, ?bias)
+ + + Parameters: +
int
+
+ + + + outFeatures + + : + int
+
+ + + + ?bias + + : + bool
+
+ + + + Returns: + Linear
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bias
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.weight
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ Long short-term memory (LSTM) recurrent neural network. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ LSTM(inputSize, hiddenSize, ?numLayers, ?bias, ?batchFirst, ?dropout, ?bidirectional)
+ + + Parameters: +
int
+
+ + + + hiddenSize + + : + int
+
+ + + + ?numLayers + + : + int
+
+ + + + ?bias + + : + bool
+
+ + + + ?batchFirst + + : + bool
+
+ + + + ?dropout + + : + float
+
+ + + + ?bidirectional + + : + bool
+
+ + + + Returns: + LSTM
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+ + | ++ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hiddenSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.inputSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.newHidden batchSize
+ + + Parameters: +
int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Unit cell of a long short-term memory (LSTM) recurrent neural network. Prefer using the RNN class instead, which can combine RNNCells in multiple layers. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ LSTMCell(inputSize, hiddenSize, ?bias, ?checkShapes)
+ + + Parameters: +
int
+
+ + + + hiddenSize + + : + int
+
+ + + + ?bias + + : + bool
+
+ + + + ?checkShapes + + : + bool
+
+ + + + Returns: + LSTMCell
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+ + + + + | +
+ + | ++ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hiddenSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.inputSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.newHidden batchSize
+ + + Parameters: +
int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Indicates the training or evaluation mode for a model. +
+© Copyright 2025, Furnace Contributors.
++ Represents a model, primarily a collection of named parameters and sub-models and a function governed by them. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.asFunction parameters input
+ + + Parameters: +
Tensor
+
+ + + + input + + : + 'In
+
+ + + + Returns: + 'Out
+
+ + |
+
+
+ + + The resulting function can be composed with a loss function and differentiated. + During execution the parameters of the model are temporarily set to the supplied parameters. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.forward arg1
+ + + Parameters: +
'In
+
+ + + + Returns: + 'Out
+
+ + Modifiers: + abstract + + |
+
+
+
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ t --> model
+ + + Parameters: +
'In
+
+ + + + model + + : + Model<'In, 'Out>
+
+ + + + Returns: + 'Out
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
+© Copyright 2025, Furnace Contributors.
++ Represents the base class of all models. +
++ Record Field + | ++ Description + | +
+ + | +
+
+
+
+ ![]() ![]() + + +
|
+
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addBuffer (buffer, name)
+ + + Parameters: +
Parameter
+
+ + + + name + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addBuffer buffers
+ + + Parameters: +
(Parameter * string)[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addBuffer buffers
+ + + Parameters: +
Parameter[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addModel (model, name)
+ + + Parameters: +
Model
+
+ + + + name + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addModel models
+ + + Parameters: +
(Model * string)[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addModel (model, name)
+ + + Parameters: +
ModelBase
+
+ + + + name + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addModel models
+ + + Parameters: +
(ModelBase * string)[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addParameter (parameter, name)
+ + + Parameters: +
Parameter
+
+ + + + name + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addParameter parameters
+ + + Parameters: +
(Parameter * string)[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addParameter parameters
+ + + Parameters: +
Parameter[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.buffers
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.buffersVector
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.eval ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.forwardDiff (derivatives, ?nestingTag)
+ + + Parameters: +
ParameterDict
+ -
+ The derivatives of the parameters
+
+ + + + ?nestingTag + + : + uint32
+ -
+ The level tag for nested differentiation. Defaults to the current global nesting level
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Adjust the parameters of the model to initiate a new level of forward-mode automatic differentiation. + + ++ + After this call the current parameters of the model will have attached derivatives for forward mode differentiation. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hasOwnBuffers
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hasOwnParameters
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hasOwnState
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isForwardDiff
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isNoDiff
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isReverseDiff
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Moves the state (parameters and buffers) of the model to the given configuration + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.nbuffers
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.noDiff ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.nparameters
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.nstate
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.parameters
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.parametersVector
+ + + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.reverseDiff ?nestingTag
+ + + Parameters: +
uint32
+ -
+ The level tag for nested differentiation. Defaults to the current global nesting level
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Adjust the parameters of the model to initiate a new level of reverse-mode automatic differentiation. + + +
+
+ After this call the current parameters of the model will support reverse-mode differentiation. After the completion
+ of the corresponding
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.state
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.stateVector
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.summary ()
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.train ()
+ + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ Represents a parameter. +
++ A parameter is a mutable register holding a tensor. +
++ Record Field + | ++ Description + | +
+ + | +
+
+
+
+ ![]() ![]() + + +
|
+
+ Constructor + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.forwardDiff (derivative, ?nestingTag)
+ + + Parameters: +
Tensor
+
+ + + + ?nestingTag + + : + uint32
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.noDiff ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.reverseDiff ?nestingTag
+ + + Parameters: +
uint32
+
+ + + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents a collection of named parameters. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.[key]
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.add parameters
+ + + Parameters: +
ParameterDict
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.add parameters
+ + + Parameters: +
(string * Parameter) list
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.add (name, parameter)
+ + + Parameters: +
'a
+
+ + + + parameter + + : + Parameter
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.clear ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+ + + This method discards differentiability and returns a ParameterDict containing parameters that are constant tensors. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.count
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.flatten ?differentiable
+ + + Parameters: +
bool
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.forwardDiff (derivatives, ?nestingTag)
+ + + Parameters: +
ParameterDict
+ -
+ The derivatives of the parameters
+
+ + + + ?nestingTag + + : + uint32
+ -
+ The level tag for nested differentiation. Defaults to the current global nesting level
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Adjust the parameters to include support for forward-mode automatic differentiation. + + ++ + After this call the current parameters in this dictionary will have attached derivatives for forward mode differentiation. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.iter f
+ + + Parameters: +
string * Parameter -> unit
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.nelement
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.noDiff ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.reverseDiff ?nestingTag
+ + + Parameters: +
uint32
+ -
+ The level tag for nested differentiation. Defaults to the current global nesting level
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Adjust the parameters to include support for reverse-mode automatic differentiation. + + +
+
+ After this call the current parameters in this dictionary will support reverse-mode differentiation. After the completion
+ of the corresponding
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.set (other, ?differentiable, ?strict)
+ + + Parameters: +
ParameterDict
+
+ + + + ?differentiable + + : + bool
+
+ + + + ?strict + + : + bool
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.unflatten (tensors, ?differentiable)
+ + + Parameters: +
Tensor
+
+ + + + ?differentiable + + : + bool
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.unflattenToNew tensors
+ + + Parameters: +
Tensor
+
+ + + + Returns: + ParameterDict
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+ + | ++ + + | +
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ LSTMWithHidden input hidden cell inputSize hiddenSize batchFirst numLayers numDirections
+ + + Parameters: +
Tensor
+
+ + + + hidden + + : + Tensor
+
+ + + + cell + + : + Tensor
+
+ + + + inputSize + + : + int
+
+ + + + hiddenSize + + : + int
+
+ + + + batchFirst + + : + bool
+
+ + + + numLayers + + : + int
+
+ + + + numDirections + + : + int
+
+ + + |
+ + + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RNN input inputSize batchFirst
+ + + Parameters: +
Tensor
+
+ + + + inputSize + + : + int
+
+ + + + batchFirst + + : + bool
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RNNCell input inputSize
+ + + Parameters: +
Tensor
+
+ + + + inputSize + + : + int
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RNNCellSequence input inputSize
+ + + Parameters: +
Tensor
+
+ + + + inputSize + + : + int
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ RNNWithHidden input hidden inputSize hiddenSize batchFirst numLayers numDirections
+ + + Parameters: +
Tensor
+
+ + + + hidden + + : + Tensor
+
+ + + + inputSize + + : + int
+
+ + + + hiddenSize + + : + int
+
+ + + + batchFirst + + : + bool
+
+ + + + numLayers + + : + int
+
+ + + + numDirections + + : + int
+
+ + + |
+ + + + | +
© Copyright 2025, Furnace Contributors.
++ Recurrent neural network. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ RNN(inputSize, hiddenSize, ?numLayers, ?nonlinearity, ?bias, ?batchFirst, ?dropout, ?bidirectional)
+ + + Parameters: +
int
+
+ + + + hiddenSize + + : + int
+
+ + + + ?numLayers + + : + int
+
+ + + + ?nonlinearity + + : + Tensor -> Tensor
+
+ + + + ?bias + + : + bool
+
+ + + + ?batchFirst + + : + bool
+
+ + + + ?dropout + + : + float
+
+ + + + ?bidirectional + + : + bool
+
+ + + + Returns: + RNN
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+ + | ++ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hiddenSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.inputSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.newHidden batchSize
+ + + Parameters: +
int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Unit cell of a recurrent neural network. Prefer using the RNN class instead, which can combine RNNCells in multiple layers. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ RNNCell(inputSize, hiddenSize, ?nonlinearity, ?bias, ?checkShapes)
+ + + Parameters: +
int
+
+ + + + hiddenSize + + : + int
+
+ + + + ?nonlinearity + + : + Tensor -> Tensor
+
+ + + + ?bias + + : + bool
+
+ + + + ?checkShapes + + : + bool
+
+ + + + Returns: + RNNCell
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hiddenSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.inputSize
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.newHidden batchSize
+ + + Parameters: +
int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Sequential(models)
+ + + Parameters: +
seq<Model>
+
+ + + + Returns: + Sequential
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Variational auto-encoder +
+© Copyright 2025, Furnace Contributors.
++ Variational auto-encoder base +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ VAEBase(zDim)
+ + + Parameters: +
int
+
+ + + + Returns: + VAEBase
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+ + | +
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.sample ?numSamples
+ + + Parameters: +
int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Variational auto-encoder with multilayer perceptron (MLP) encoder and decoder. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ VAEMLP(xDim, zDim, ?hDims, ?nonlinearity, ?nonlinearityLast)
+ + + Parameters: +
int
+
+ + + + zDim + + : + int
+
+ + + + ?hDims + + : + seq<int>
+
+ + + + ?nonlinearity + + : + Tensor -> Tensor
+
+ + + + ?nonlinearityLast + + : + Tensor -> Tensor
+
+ + + + Returns: + VAEMLP
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Contains functionality related to generating initial parameter weights for models. +
++ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Weight.kaiming (fanIn, fanOut, ?a)
+ + + Parameters: +
int
+
+ + + + fanOut + + : + int
+
+ + + + ?a + + : + float
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Weight.uniform (shape, k)
+ + + Parameters: +
seq<int>
+
+ + + + k + + : + float
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Contains types and functionality related to describing models. +
++ Type/Module + | ++ Description + | +
+ + + + BatchNorm1d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies Batch Normalization over a 2D or 3D input (a mini-batch of 1D inputs with optional additional channel dimension) + + |
+
+ + + + BatchNorm2d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies Batch Normalization over a 4D input (a mini-batch of 2D inputs with optional additional channel dimension) + + |
+
+ + + + BatchNorm3d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies Batch Normalization over a 5D input (a mini-batch of 3D inputs with optional additional channel dimension) + + |
+
+ + + + Conv1d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model that applies a 1D convolution over an input signal composed of several input planes + + |
+
+ + + + Conv2d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model that applies a 2D convolution over an input signal composed of several input planes + + |
+
+ + + + Conv3d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model that applies a 3D convolution over an input signal composed of several input planes + + |
+
+ + + + ConvTranspose1d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model that applies a 1D transposed convolution operator over an input image composed of several input planes. + + |
+
+ + + + ConvTranspose2d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model that applies a 2D transposed convolution operator over an input image composed of several input planes. + + |
+
+ + + + ConvTranspose3d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model that applies a 3D transposed convolution operator over an input image composed of several input planes. + + |
+
+ + + + Dropout + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model which during training, randomly zeroes some of the elements of the input tensor with probability p using samples from a Bernoulli distribution. + + |
+
+ + + + Dropout2d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model which during training, randomly zero out entire channels. Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution. + + |
+
+ + + + Dropout3d + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model which during training, randomly zero out entire channels. Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution. + + |
+
+ + + + Linear + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + A model that applies a linear transformation to the incoming data: \(y = xA^T + b\) + + |
+
+ + | ++ + | +
+ + + + LSTMCell + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Unit cell of a long short-term memory (LSTM) recurrent neural network. Prefer using the RNN class instead, which can combine RNNCells in multiple layers. + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + + + Model<'In, 'Out> + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Represents a model, primarily a collection of named parameters and sub-models and a function governed by them. + + |
+
+ + + + ModelBase + + + + |
+ + + | +
+ + + + Parameter + + + + |
+ + + | +
+ + + + ParameterDict + + + + |
+ + + | +
+ + + + RecurrentShape + + + + |
+ + + | +
+ + | ++ + | +
+ + + + RNNCell + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Unit cell of a recurrent neural network. Prefer using the RNN class instead, which can combine RNNCells in multiple layers. + + |
+
+ + + + Sequential + + + + |
+ + + | +
+ + | ++ + | +
+ + + + VAEBase + + + + |
+ + + | +
+ + + + VAEMLP + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Variational auto-encoder with multilayer perceptron (MLP) encoder and decoder. + + |
+
+ + + + Weight + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Contains functionality related to generating initial parameter weights for models. + + |
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
© Copyright 2025, Furnace Contributors.
++ +
++ Modules + | ++ Description + | +
+ + + + Shorten + + + + |
+ + + | +
+ Type extension + | ++ Description + | +
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.avgpool1d (kernelSize, ?stride, ?padding)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D average pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.avgpool1d (input, kernelSize, ?stride, ?padding)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D average pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.avgpool2d (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D average pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.avgpool2d (input, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D average pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.avgpool3d (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D average pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FurnaceImage.avgpool3d (input, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
Tensor
+ -
+ The input tensor.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D average pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Batched matrix product of two tensors. Tensors b must be 3d tensors each containing the same number of matrices. If the tensor is a \(b \times n \times m\) tensor, and b is a \(b \times m \times p\) tensor, the result will be a \(b \times n \times p\) tensor. + +
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Batched matrix product of two tensors. Tensors a and b must be 3d tensors each containing the same number of matrices. If a is a \(b \times n \times m\) tensor, b is a \(b \times m \times p\) tensor, the result will be a \(b \times n \times p\) tensor. + +
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.det ()
+ + + Parameters: +
unit
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.inv ()
+ + + Parameters: +
unit
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.norm (?order, ?dim, ?keepDim)
+ + + Parameters: +
float
+
+ + + + ?dim + + : + int
+
+ + + + ?keepDim + + : + bool
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ TBD +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Adam(model, ?lr, ?beta1, ?beta2, ?eps, ?weightDecay, ?reversible)
+ + + Parameters: +
Model
+
+ + + + ?lr + + : + Tensor
+
+ + + + ?beta1 + + : + Tensor
+
+ + + + ?beta2 + + : + Tensor
+
+ + + + ?eps + + : + Tensor
+
+ + + + ?weightDecay + + : + Tensor
+
+ + + + ?reversible + + : + bool
+
+ + + + Returns: + Adam
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ TBD +
++ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ optim.adam (model, dataloader, loss, ?lr, ?beta1, ?beta2, ?eps, ?weightDecay, ?reversible, ?iters, ?epochs, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix)
+ + + Parameters: +
Model
+
+ + + + dataloader + + : + DataLoader
+
+ + + + loss + + : + Tensor -> Tensor -> Tensor
+
+ + + + ?lr + + : + Tensor
+
+ + + + ?beta1 + + : + Tensor
+
+ + + + ?beta2 + + : + Tensor
+
+ + + + ?eps + + : + Tensor
+
+ + + + ?weightDecay + + : + Tensor
+
+ + + + ?reversible + + : + bool
+
+ + + + ?iters + + : + int
+
+ + + + ?epochs + + : + int
+
+ + + + ?threshold + + : + double
+
+ + + + ?print + + : + bool
+
+ + + + ?printEvery + + : + int
+
+ + + + ?printPrefix + + : + string
+
+ + + + ?printPostfix + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ optim.adam (f, x0, ?lr, ?beta1, ?beta2, ?eps, ?iters, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix)
+ + + Parameters: +
Tensor -> Tensor
+
+ + + + x0 + + : + Tensor
+
+ + + + ?lr + + : + Tensor
+
+ + + + ?beta1 + + : + Tensor
+
+ + + + ?beta2 + + : + Tensor
+
+ + + + ?eps + + : + Tensor
+
+ + + + ?iters + + : + int
+
+ + + + ?threshold + + : + double
+
+ + + + ?print + + : + bool
+
+ + + + ?printEvery + + : + int
+
+ + + + ?printPrefix + + : + string
+
+ + + + ?printPostfix + + : + string
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ optim.sgd (model, dataloader, loss, ?lr, ?momentum, ?nesterov, ?weightDecay, ?reversible, ?iters, ?epochs, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix)
+ + + Parameters: +
Model
+
+ + + + dataloader + + : + DataLoader
+
+ + + + loss + + : + Tensor -> Tensor -> Tensor
+
+ + + + ?lr + + : + Tensor
+
+ + + + ?momentum + + : + Tensor
+
+ + + + ?nesterov + + : + bool
+
+ + + + ?weightDecay + + : + Tensor
+
+ + + + ?reversible + + : + bool
+
+ + + + ?iters + + : + int
+
+ + + + ?epochs + + : + int
+
+ + + + ?threshold + + : + double
+
+ + + + ?print + + : + bool
+
+ + + + ?printEvery + + : + int
+
+ + + + ?printPrefix + + : + string
+
+ + + + ?printPostfix + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ optim.sgd (f, x0, ?lr, ?momentum, ?nesterov, ?iters, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix)
+ + + Parameters: +
Tensor -> Tensor
+
+ + + + x0 + + : + Tensor
+
+ + + + ?lr + + : + Tensor
+
+ + + + ?momentum + + : + Tensor
+
+ + + + ?nesterov + + : + bool
+
+ + + + ?iters + + : + int
+
+ + + + ?threshold + + : + double
+
+ + + + ?print + + : + bool
+
+ + + + ?printEvery + + : + int
+
+ + + + ?printPrefix + + : + string
+
+ + + + ?printPostfix + + : + string
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Represents an optimizer. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.stateStep
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.step ()
+ + + |
+ + + | +
+
+
+
+
+
+
+ |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ TBD +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ SGD(model, ?lr, ?momentum, ?nesterov, ?weightDecay, ?reversible)
+ + + Parameters: +
Model
+
+ + + + ?lr + + : + Tensor
+
+ + + + ?momentum + + : + Tensor
+
+ + + + ?nesterov + + : + bool
+
+ + + + ?weightDecay + + : + Tensor
+
+ + + + ?reversible + + : + bool
+
+ + + + Returns: + SGD
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Contains types and functionality related to optimizing models and functions. +
++ Type + | ++ Description + | +
+ + | ++ + | +
+ + | ++ + | +
+ + + + Optimizer + + + + |
+ + + | +
+ + | ++ + | +
© Copyright 2025, Furnace Contributors.
++ +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Custom(threshold, edgeItems, precision)
+ + + Parameters: +
int
+
+ + + + edgeItems + + : + int
+
+ + + + precision + + : + int
+
+ + + |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Default
+ + + |
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+ ![]() ![]() + + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.edgeItems
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.precision
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.threshold
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains functions and settings related to print options. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Get or set the default printer used when printing tensors. Note, use
|
+
© Copyright 2025, Furnace Contributors.
++ + Represents a scalar on the Furnace programming model + +
+© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dtype ()
+ + + Parameters: +
unit
+
+ + + + Returns: + Dtype
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.log ()
+ + + Parameters: +
unit
+
+ + + + Returns: + scalar
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.neg ()
+ + + Parameters: +
unit
+
+ + + + Returns: + scalar
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+ |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toBool ()
+ + + Parameters: +
unit
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toByte ()
+ + + Parameters: +
unit
+
+ + + + Returns: + byte
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toDouble ()
+ + + Parameters: +
unit
+
+ + + + Returns: + float
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toInt16 ()
+ + + Parameters: +
unit
+
+ + + + Returns: + int16
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toInt32 ()
+ + + Parameters: +
unit
+
+ + + + Returns: + int
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toInt64 ()
+ + + Parameters: +
unit
+
+ + + + Returns: + int64
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toSByte ()
+ + + Parameters: +
unit
+
+ + + + Returns: + sbyte
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toSingle ()
+ + + Parameters: +
unit
+
+ + + + Returns: + float32
+
+ + Modifiers: + inline + + |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Represents the shape of a tensor. + +
+© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ boundsIsScalar bounds
+ + + Parameters: +
int[,]
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ boundsToLocation bounds
+ + + Parameters: +
int[,]
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Converts the array of three-position bounds specifications to a location. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ boundsToShape bounds
+ + + Parameters: +
int[,]
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Converts the array of three-position bounds specifications to a shape without squeezing out scalars + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dilatedCoordinates coordinates dilations
+ + + Parameters: +
int[]
+
+ + + + dilations + + : + int[]
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ flatIndexToIndex shape flatIndex
+ + + Parameters: +
int[]
+
+ + + + flatIndex + + : + int
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Converts the given flat index to an index in the context of the given shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ indexToFlatIndex shape index
+ + + Parameters: +
int[]
+
+ + + + index + + : + int[]
+
+ + + + Returns: + int
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Converts the given index to a flat index in the context of the given shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ mirrorCoordinates coordinates shape mirrorDims
+ + + Parameters: +
int[]
+
+ + + + shape + + : + int[]
+
+ + + + mirrorDims + + : + int[]
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Mirrors the coordinates in the given dimensions in the context of the given shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ shapeLength shape
+ + + Parameters: +
Shape
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ shapeToFullBounds shape
+ + + Parameters: +
Shape
+
+ + + + Returns: + int[,]
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains functions and values related to tensor shapes. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Finds the shape into which `shape1` and `shape2` can be expanded. + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Indicates if one shape can expand into another through the addition of broadcast dimensions. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for an addSlice operation. + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for an avgpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanAvgpool2d dtype shape kernelSize strides paddings
+ + + Parameters: +
Dtype
+
+ + + + shape + + : + Shape
+
+ + + + kernelSize + + : + int[]
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int) * (int * int) * (int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for an avgpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanAvgpool3d dtype shape kernelSize strides paddings
+ + + Parameters: +
Dtype
+
+ + + + shape + + : + Shape
+
+ + + + kernelSize + + : + int[]
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int * int) * (int * int * int) * (int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for an avgpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a batched matrix multiplication operation. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanCat shapes dim
+ + + Parameters: +
Shape[]
+
+ + + + dim + + : + int
+
+ + + + Returns: + int * int[] * int * int[] * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a concatenation operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanConv1d deviceType1 deviceType2 dtype1 dtype2 shape1 shape2 stride padding dilation
+ + + Parameters: +
DeviceType
+
+ + + + deviceType2 + + : + DeviceType
+
+ + + + dtype1 + + : + Dtype
+
+ + + + dtype2 + + : + Dtype
+
+ + + + shape1 + + : + Shape
+
+ + + + shape2 + + : + Shape
+
+ + + + stride + + : + int
+
+ + + + padding + + : + int
+
+ + + + dilation + + : + int
+
+ + + + Returns: + int * int * int * int * int * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a convolution operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanConv2d deviceType1 deviceType2 dtype1 dtype2 shape1 shape2 strides paddings dilations
+ + + Parameters: +
DeviceType
+
+ + + + deviceType2 + + : + DeviceType
+
+ + + + dtype1 + + : + Dtype
+
+ + + + dtype2 + + : + Dtype
+
+ + + + shape1 + + : + Shape
+
+ + + + shape2 + + : + Shape
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + dilations + + : + int[]
+
+ + + + Returns: + int * int * (int * int) * (int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a convolution operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanConv3d deviceType1 deviceType2 dtype1 dtype2 shape1 shape2 strides paddings dilations
+ + + Parameters: +
DeviceType
+
+ + + + deviceType2 + + : + DeviceType
+
+ + + + dtype1 + + : + Dtype
+
+ + + + dtype2 + + : + Dtype
+
+ + + + shape1 + + : + Shape
+
+ + + + shape2 + + : + Shape
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + dilations + + : + int[]
+
+ + + + Returns: + int * int * (int * int * int) * (int * int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a convolution operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanConvTranspose1d deviceType1 deviceType2 dtype1 dtype2 shape1 shape2 stride padding dilation outputPadding
+ + + Parameters: +
DeviceType
+
+ + + + deviceType2 + + : + DeviceType
+
+ + + + dtype1 + + : + Dtype
+
+ + + + dtype2 + + : + Dtype
+
+ + + + shape1 + + : + Shape
+
+ + + + shape2 + + : + Shape
+
+ + + + stride + + : + int
+
+ + + + padding + + : + int
+
+ + + + dilation + + : + int
+
+ + + + outputPadding + + : + int
+
+ + + + Returns: + int * int * int * int * int * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a transposed convolution operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanConvTranspose2d deviceType1 deviceType2 dtype1 dtype2 shape1 shape2 strides paddings dilations outputPaddings
+ + + Parameters: +
DeviceType
+
+ + + + deviceType2 + + : + DeviceType
+
+ + + + dtype1 + + : + Dtype
+
+ + + + dtype2 + + : + Dtype
+
+ + + + shape1 + + : + Shape
+
+ + + + shape2 + + : + Shape
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + dilations + + : + int[]
+
+ + + + outputPaddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int) * (int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a transposed convolution operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanConvTranspose3d deviceType1 deviceType2 dtype1 dtype2 shape1 shape2 strides paddings dilations outputPaddings
+ + + Parameters: +
DeviceType
+
+ + + + deviceType2 + + : + DeviceType
+
+ + + + dtype1 + + : + Dtype
+
+ + + + dtype2 + + : + Dtype
+
+ + + + shape1 + + : + Shape
+
+ + + + shape2 + + : + Shape
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + dilations + + : + int[]
+
+ + + + outputPaddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int * int) * (int * int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a transposed convolution operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a determinant operation. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanDilate dim dilations
+ + + Parameters: +
int
+
+ + + + dilations + + : + int[]
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a dilate operation. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a dot product operation. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanDropout p
+ + + Parameters: +
double
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a dropout operation. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanDropout2d shape p
+ + + Parameters: +
Shape
+
+ + + + p + + : + double
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a dropout2d operation. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanDropout3d shape p
+ + + Parameters: +
Shape
+
+ + + + p + + : + double
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a dropout3d operation. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if one shape can expand into another through the addition of broadcast dimensions. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanFlatten shape startDim endDim
+ + + Parameters: +
Shape
+
+ + + + startDim + + : + int
+
+ + + + endDim + + : + int
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a flatten operation. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanFlip dim dims
+ + + Parameters: +
int
+
+ + + + dims + + : + int[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a gather operation. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanGetSlice shape fullBounds
+ + + Parameters: +
Shape
+
+ + + + fullBounds + + : + int[,]
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a GetSlice operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanIndex shape index
+ + + Parameters: +
int[]
+
+ + + + index + + : + int[]
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given index is valid in the context of the given shape. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a transpose operation. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a matmul operation. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxOrAvgpool1d nm dtype shape kernelSize stride padding
+ + + Parameters: +
string
+
+ + + + dtype + + : + Dtype
+
+ + + + shape + + : + Shape
+
+ + + + kernelSize + + : + int
+
+ + + + stride + + : + int
+
+ + + + padding + + : + int
+
+ + + + Returns: + int * int * int * int * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxOrAvgpool2d nm dtype shape kernelSize strides paddings
+ + + Parameters: +
string
+
+ + + + dtype + + : + Dtype
+
+ + + + shape + + : + Shape
+
+ + + + kernelSize + + : + int[]
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int) * (int * int) * (int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxOrAvgpool3d nm dtype shape kernelSize strides paddings
+ + + Parameters: +
string
+
+ + + + dtype + + : + Dtype
+
+ + + + shape + + : + Shape
+
+ + + + kernelSize + + : + int[]
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int * int) * (int * int * int) * (int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxpool2d dtype shape kernelSize strides paddings
+ + + Parameters: +
Dtype
+
+ + + + shape + + : + Shape
+
+ + + + kernelSize + + : + int[]
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int) * (int * int) * (int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxpool3d dtype shape kernelSize strides paddings
+ + + Parameters: +
Dtype
+
+ + + + shape + + : + Shape
+
+ + + + kernelSize + + : + int[]
+
+ + + + strides + + : + int[]
+
+ + + + paddings + + : + int[]
+
+ + + + Returns: + int * int * (int * int * int) * (int * int * int) * (int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxunpool1d dtype shape indicesDtype indicesShape outputSize
+ + + Parameters: +
Dtype
+
+ + + + shape + + : + Shape
+
+ + + + indicesDtype + + : + Dtype
+
+ + + + indicesShape + + : + Shape
+
+ + + + outputSize + + : + int[]
+
+ + + + Returns: + int * int * int * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxunpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxunpool2d dtype shape indicesDtype indicesShape outputSize
+ + + Parameters: +
Dtype
+
+ + + + shape + + : + Shape
+
+ + + + indicesDtype + + : + Dtype
+
+ + + + indicesShape + + : + Shape
+
+ + + + outputSize + + : + int[]
+
+ + + + Returns: + int * int * (int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxunpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMaxunpool3d dtype shape indicesDtype indicesShape outputSize
+ + + Parameters: +
Dtype
+
+ + + + shape + + : + Shape
+
+ + + + indicesDtype + + : + Dtype
+
+ + + + indicesShape + + : + Shape
+
+ + + + outputSize + + : + int[]
+
+ + + + Returns: + int * int * (int * int * int) * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a maxunpool operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanMinMaxReduce dim keepDim shape
+ + + Parameters: +
int
+
+ + + + keepDim + + : + bool
+
+ + + + shape + + : + Shape
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanPad shape paddings
+ + + Parameters: +
Shape
+
+ + + + paddings + + : + int[]
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanPermute shape permutation
+ + + Parameters: +
Shape
+
+ + + + permutation + + : + int[]
+
+ + + + Returns: + int[] * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a permute operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanRepeat shape dim
+ + + Parameters: +
Shape
+
+ + + + dim + + : + int
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a repeat operation. + + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a scatter operation. + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a linear solve operation, and returns the resulting shape of the solution + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanSplit shape sizes dim
+ + + Parameters: +
Shape
+
+ + + + sizes + + : + int[]
+
+ + + + dim + + : + int
+
+ + + + Returns: + int[][]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a split operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanStack shapes dim
+ + + Parameters: +
Shape[]
+
+ + + + dim + + : + int
+
+ + + + Returns: + int * int[] * int[] * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a stack operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanTranspose shape dim0 dim1
+ + + Parameters: +
Shape
+
+ + + + dim0 + + : + int
+
+ + + + dim1 + + : + int
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a transpose operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanTranspose2d dim
+ + + Parameters: +
int
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for a transpose operation. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanUnsqueeze dim shape
+ + + Parameters: +
int
+
+ + + + shape + + : + Shape
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shape is appropriate for an unsqueeze operation and returns the resulting shape. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkCanUnstack shape dim
+ + + Parameters: +
Shape
+
+ + + + dim + + : + int
+
+ + + + Returns: + int[] * int[] * int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for an unstack operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ checkDeviceTypes deviceType1 deviceType2
+ + + Parameters: +
DeviceType
+
+ + + + deviceType2 + + : + DeviceType
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Completes the given shape with respect to a tensor with the given number of elements. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ completeDim dims dim
+ + + Parameters: +
int
+
+ + + + dim + + : + int
+
+ + + + Returns: + int
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Completes the given shape dimension with respect to a concrete dimension. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ completeDimUnsqueeze dims dim
+ + + Parameters: +
int
+
+ + + + dim + + : + int
+
+ + + + Returns: + int
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Completes the given shape dimension with respect to a concrete dimension, for the unsqueeze operation. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Completes the new shape for an expand operation based on the current shape of the tensor. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ completeSliceBounds shape bounds
+ + + Parameters: +
Shape
+
+ + + + bounds + + : + int[,]
+
+ + + + Returns: + int[,]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ computeTranspose2d shape
+ + + Parameters: +
Shape
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Checks if the given shapes are appropriate for a transpose operation and returns information related to the resulting shape. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ create xs
+ + + Parameters: +
seq<int>
+
+ + + + Returns: + int[]
+
+ + Modifiers: + inline + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dilated shape dilations
+ + + Parameters: +
Shape
+
+ + + + dilations + + : + int[]
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ flatten startDim endDim shape
+ + + Parameters: +
int
+
+ + + + endDim + + : + int
+
+ + + + shape + + : + Shape
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ locationToBounds shape location
+ + + Parameters: +
Shape
+
+ + + + location + + : + int[]
+
+ + + + Returns: + int[,]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Converts the given location to a three-element bounds array in the context of the given shape. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ nelement shape
+ + + Parameters: +
Shape
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve2dConvOutputPadding outputPadding outputPaddings
+ + + Parameters: +
int option
+
+ + + + outputPaddings + + : + 'b option
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve2dConvSizes stride strides padding paddings dilation dilations
+ + + Parameters: +
int option
+
+ + + + strides + + : + 'b option
+
+ + + + padding + + : + int option
+
+ + + + paddings + + : + 'c option
+
+ + + + dilation + + : + int option
+
+ + + + dilations + + : + 'd option
+
+ + + + Returns: + int[] * int[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve2dKernelSizes kernelSize kernelSizes
+ + + Parameters: +
int option
+
+ + + + kernelSizes + + : + 'a option
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve2dMaxPoolSizes kernelSize kernelSizes stride strides padding paddings
+ + + Parameters: +
'b option
+
+ + + + kernelSizes + + : + 'c option
+
+ + + + stride + + : + 'b option
+
+ + + + strides + + : + 'd option
+
+ + + + padding + + : + int option
+
+ + + + paddings + + : + 'e option
+
+ + + + Returns: + 'b[] * 'b[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve3dConvOutputPadding outputPadding outputPaddings
+ + + Parameters: +
int option
+
+ + + + outputPaddings + + : + 'b option
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve3dConvSizes stride strides padding paddings dilation dilations
+ + + Parameters: +
int option
+
+ + + + strides + + : + 'b option
+
+ + + + padding + + : + int option
+
+ + + + paddings + + : + 'c option
+
+ + + + dilation + + : + int option
+
+ + + + dilations + + : + 'd option
+
+ + + + Returns: + int[] * int[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve3dKernelSizes kernelSize kernelSizes
+ + + Parameters: +
int option
+
+ + + + kernelSizes + + : + 'a option
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ resolve3dMaxPoolSizes kernelSize kernelSizes stride strides padding paddings
+ + + Parameters: +
'b option
+
+ + + + kernelSizes + + : + 'c option
+
+ + + + stride + + : + 'b option
+
+ + + + strides + + : + 'd option
+
+ + + + padding + + : + int option
+
+ + + + paddings + + : + 'e option
+
+ + + + Returns: + 'b[] * 'b[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ squeeze dim shape
+ + + Parameters: +
int
+
+ + + + shape + + : + Shape
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ undilatedShape shape dilations
+ + + Parameters: +
Shape
+
+ + + + dilations + + : + int[]
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+ |
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
+ + | +
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int option
+
+ + + + i0max + + : + int option
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1min + + : + int option
+
+ + + + i1max + + : + int option
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2min + + : + int option
+
+ + + + i2max + + : + int option
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3min + + : + int option
+
+ + + + i3max + + : + int option
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4min + + : + int option
+
+ + + + i4max + + : + int option
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5min + + : + int option
+
+ + + + i5max + + : + int option
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int
+
+ + + + i1 + + : + int
+
+ + + + i2 + + : + int
+
+ + + + i3 + + : + int
+
+ + + + i4 + + : + int
+
+ + + + i5 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+ Extended Type:
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Represents a multi-dimensional data type containing elements of a single data type. + +
++ + A tensor can be constructed from a list or sequence using FurnaceImage.tensor
+ let t = FurnaceImage.tensor([[1.; -1.]; [1.; -1.]])+ +
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetSlice
+ + + Parameters: +
int[,]
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.[index]
+ + + Parameters: +
int[]
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Each element of the object tensor is added to the scalar b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Each element of the object tensor is added to each corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.allclose (tensor, ?relativeTolerance, ?absoluteTolerance)
+ + + Parameters: +
Tensor
+
+ + + + ?relativeTolerance + + : + float
+
+ + + + ?absoluteTolerance + + : + float
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Indicates if two tensors have the same shape and all corresponding elements are equal within the + given tolerances. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + A debugging routine that returns the ancestors of a tensor involved in reverse-mode automatic differentiation + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.arangeLike (endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + ?startVal + + : + int
+
+ + + + ?step + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor in the manner of
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.arangeLike (endVal, ?startVal, ?step, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+
+ + + + ?startVal + + : + float
+
+ + + + ?step + + : + float
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor in the manner of
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.argmax (dim, ?keepDim)
+ + + Parameters: +
int
+
+ + + + ?keepDim + + : + bool
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the indexes of maximum values of the primal of the tensor, reducing the given dimension. + +
+ The resulting tensor does not participate in reverse or forward differentiation. It can be used as input to another operation such as
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.argmax ()
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.argmin (dim, ?keepDim)
+ + + Parameters: +
int
+
+ + + + ?keepDim + + : + bool
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the indexes of minimum values of the primal of the tensor, reducing the given dimension. + +
+ The resulting tensor does not participate in reverse or forward differentiation. It can be used as input to another operation such as
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.argmin ()
+ + + + Returns: + int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.backward value
+ + + Parameters: +
Tensor
+
+ + + Modifiers: + inline + + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bceLoss (target, ?weight, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The target tensor.
+
+ + + + ?weight + + : + Tensor
+ -
+ A manual rescaling weight given to the loss of each batch element.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Creates a criterion that measures the Binary Cross Entropy between the target and the output + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.bernoulli (?device, ?dtype, ?backend)
+ + + Parameters: +
Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with each element converted to type bfloat16 + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with each element converted to type float64 + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the ceil of the elements of input, the smallest integer greater than or equal to each element. + ++ The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Clamp all elements in input into the range [ low..high] and return a resulting tensor + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+ + + This method discards differentiability and returns a constant tensor. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.conv1d (filters, ?stride, ?padding, ?dilation)
+ + + Parameters: +
Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit paddings on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D convolution over an input signal composed of several input planes + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.conv2d (filters, ?stride, ?padding, ?dilation, ?strides, ?paddings, ?dilations)
+ + + Parameters: +
Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on corresponding sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D convolution over an input signal composed of several input planes + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.conv3d (filters, ?stride, ?padding, ?dilation, ?strides, ?paddings, ?dilations)
+ + + Parameters: +
Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on corresponding sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D convolution over an input signal composed of several input planes + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.convTranspose1d (filters, ?stride, ?padding, ?dilation, ?outputPadding)
+ + + Parameters: +
Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?outputPadding + + : + int
+ -
+ The additional size added to one side of each dimension in the output shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.convTranspose2d (filters, ?stride, ?padding, ?dilation, ?outputPadding, ?strides, ?paddings, ?dilations, ?outputPaddings)
+ + + Parameters: +
Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?outputPadding + + : + int
+ -
+ The additional size added to one side of each dimension in the output shape.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + ?outputPaddings + + : + seq<int>
+ -
+ The additional sizes added to one side of each dimension in the output shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.convTranspose3d (filters, ?stride, ?padding, ?dilation, ?outputPadding, ?strides, ?paddings, ?dilations, ?outputPaddings)
+ + + Parameters: +
Tensor
+ -
+ The filters.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the convolving kernel.
+
+ + + + ?padding + + : + int
+ -
+ The implicit padding on both sides of the input.
+
+ + + + ?dilation + + : + int
+ -
+ The spacing between kernel elements.
+
+ + + + ?outputPadding + + : + int
+ -
+ The additional size added to one side of each dimension in the output shape.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the convolving kernel.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + ?dilations + + : + seq<int>
+ -
+ The spacings between kernel elements.
+
+ + + + ?outputPaddings + + : + seq<int>
+ -
+ The additional sizes added to one side of each dimension in the output shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D transposed convolution operator over an input signal composed of several input planes, sometimes also called 'deconvolution'. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.corrcoef ()
+ + + + Returns: + Tensor
+
+
+ The correlation coefficient matrix \(R\) is computed from the covariance
+ matrix
+ Returns a square tensor representing the correlation coefficient matrix.
+ Given a tensor with \(N\) variables \(X=[x_1,x_2,\ldots,x_N]\) the
+ \(R_{i,j}\) entry on the correlation matrix is the correlation between
+ \(x_i\) and \(x_j\).
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Estimates the Pearson correlation coefficient matrix for the given tensor. The tensor's first + dimension should index variables and the second dimension should + index observations for each variable. + + ++ + The correlation between variables \(x\) and \(y\) is + \[cor(x,y)= \frac{\sum^{N}_{i = 1}(x_{i} - \mu_x)(y_{i} - \mu_y)}{\sigma_x \sigma_y (N ~-~1)}\] + where \(\mu_x\) and \(\mu_y\) are the sample means and \(\sigma_x\) and \(\sigma_x\) are + the sample standard deviations. + + +
+ Example +++ + let x = FurnaceImage.tensor([-0.2678; -0.0908; -0.3766; 0.2780]) + let y = FurnaceImage.tensor([-0.5812; 0.1535; 0.2387; 0.2350]) + let xy = FurnaceImage.stack([x;y]) + xy.corrcoef()+ Evaluates to + + tensor([[1.0000, 0.3582], + [0.3582, 1.0000]])+ + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the hyperbolic cosine of the elements of input. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.cov (?correction, ?fweights, ?aweights)
+ + + Parameters: +
int64
+ -
+ Difference between the sample size and the sample degrees of freedom. Defaults to 1 (Bessel's correction).
+
+ + + + ?fweights + + : + Tensor
+ -
+ Frequency weights represent the number of times each observation was observed.
+ Should be given as a tensor of integers. Defaults to no weights.
+
+ + + + ?aweights + + : + Tensor
+ -
+ Relative importance weights, larger weights for observations that
+ should have a larger effect on the estimate.
+ Should be given as a tensor of floating point numbers. Defaults to no weights.
+
+ + + + Returns: + Tensor
+
+ Returns a square tensor representing the covariance matrix.
+ Given a tensor with \(N\) variables \(X=[x_1,x_2,\ldots,x_N]\) the
+ \(C_{i,j}\) entry on the covariance matrix is the covariance between
+ \(x_i\) and \(x_j\).
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Estimates the covariance matrix of the given tensor. The tensor's first + dimension should index variables and the second dimension should + index observations for each variable. + + +
+
+ If no weights are given, the covariance between variables \(x\) and \(y\) is
+ \[cov(x,y)= \frac{\sum^{N}_{i = 1}(x_{i} - \mu_x)(y_{i} - \mu_y)}{N~-~\text{correction}}\]
+ where \(\mu_x\) and \(\mu_y\) are the sample means.
+
+ If there are fweights or aweights then the covariance is
+ \[cov(x,y)=\frac{\sum^{N}_{i = 1}w_i(x_{i} - \mu_x^*)(y_{i} - \mu_y^*)}{\text{normalization factor}}\]
+ where \(w\) is either fweights or aweights if one weight type is provided.
+ If both weight types are provided \(w=\text{fweights}\times\text{aweights}\).
+ \(\mu_x^* = \frac{\sum^{N}_{i = 1}w_ix_{i} }{\sum^{N}_{i = 1}w_i}\)
+ is the weighted mean of variables.
+ The normalization factor is \(\sum^{N}_{i=1} w_i\) if only fweights are provided or if aweights are provided and
+ Example +++ + let x = FurnaceImage.tensor([0.0;3.4;5.0]) + let y = FurnaceImage.tensor([1.0;2.3;-3.0]) + let xy = FurnaceImage.stack([x;y]) + xy.cov()+ Evaluates to + + tensor([[ 6.5200, -4.0100], + [-4.0100, 7.6300]])+ + |
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.crossEntropyLoss (target, ?weight, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The target tensor.
+
+ + + + ?weight + + : + Tensor
+ -
+ A optional manual rescaling weight given to the loss of each batch element.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.depth
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.derivative
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.diagonal (?offset, ?dim1, ?dim2)
+ + + Parameters: +
int
+
+ + + + ?dim1 + + : + int
+
+ + + + ?dim2 + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor with the diagonal elements with respect to
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dilate dilations
+ + + Parameters: +
seq<int>
+ -
+ The dilations to use.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Dilate the tensor in using the given dilations in each corresponding dimension. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dim
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Divides each element of the object tensor by the scalar b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Divides each element of the object tensor by the corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Computes the dot product (inner product) of two vector (1d-tensors). + ++ This function does not broadcast and expects this tensor to be a vector (1d-tensor). + The tensors must have the same number of elements. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with each element converted to type float64 + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dropout ?p
+ + + Parameters: +
double
+ -
+ The probability of an element to be zeroed. Default: 0.5.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Randomly zeroes some of the elements of the input tensor with probability p using samples from a Bernoulli distribution + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dropout2d ?p
+ + + Parameters: +
double
+ -
+ The probability of an element to be zeroed. Default: 0.5.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Randomly zero out entire channels (a channel is a 2D feature map, e.g., the jj -th channel of the ii -th sample in the batched input is a 2D tensor \text{input}[i, j]input[i,j] ). Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dropout3d ?p
+ + + Parameters: +
double
+ -
+ The probability of an element to be zeroed. Default: 0.5.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Randomly zero out entire channels (a channel is a 3D feature map, e.g., the jj -th channel of the ii -th sample in the batched input is a 3D tensor \text{input}[i, j]input[i,j] ). Each channel will be zeroed out independently on every forward call with probability p using samples from a Bernoulli distribution. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.elementSize
+ + + + Returns: + int
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the size in bytes of an individual element in this tensor. Depending on dtype, backend configuration, this is not guaranteed to be correct and can behave differently in different runtime environments. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+ Computes element-wise \(a = b\), returning a boolean tensor containing a
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.expand newShape
+ + + Parameters: +
seq<int>
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new view of the object tensor with singleton dimensions expanded to a larger size. + ++ Passing -1 as the size for a dimension means not changing the size of that dimension. The tensor can be also expanded to a larger number of dimensions, and the new ones will be appended + at the front. For the new dimensions, the size cannot be set to -1. + + Expanding a tensor does not allocate new memory, but only creates a new view on the existing tensor + where a dimension of size one is expanded to a larger size by setting the stride to 0. Any dimension + of size 1 can be expanded to an arbitrary value without allocating new memory. + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.fanout
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets the fanout of a tensor used in reverse-mode differentiation + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.flatten (?startDim, ?endDim)
+ + + Parameters: +
int
+ -
+ The first dim to flatten.
+
+ + + + ?endDim + + : + int
+ -
+ The last dim to flatten.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.flip dims
+ + + Parameters: +
seq<int>
+ -
+ The axis to flip on.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with each element converted to type float64 + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with each element converted to type float16 + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with each element converted to type float32 + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with each element converted to type float64 + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the floor of the elements of input, the largest integer less than or equal to each element. + ++ The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the input tensor with added support for forward-mode automatic differentiation. + + ++ + Any tensors produced using this tensor will have attached derivatives for forward mode propagation. + The current global nesting level is used for nested differentiation. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor filled with the given scalar value for the given shape, element type and configuration, defaulting to the + shape and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+ Computes element-wise \(a \geq b\), returning a boolean tensor containing a
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with the same contents moved to the primary GPU device + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+ Computes element-wise \(a > b\), returning a boolean tensor containing a
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hasinf ()
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hasinfnan ()
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.hasnan ()
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isForwardDiff
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Indicates if a tensor is taking part in forward-mode differentiation + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isNoDiff
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Indicates if a tensor is a constant, meaning that it is not taking part in forward or reverse-mode differentiation + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isReverseDiff
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Indicates if a tensor is taking part in reverse-mode differentiation + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.isSameDiffType t2
+ + + Parameters: +
Tensor
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with boolean elements representing if each element is +/-INF or not. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with boolean elements representing if each element is NaN or not. Complex values are considered NaN when either their real and/or imaginary part is NaN. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+ Computes element-wise \(a \leq b\), returning a boolean tensor containing a
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.leakyRelu ?negativeSlope
+ + + Parameters: +
float
+ -
+ Controls the angle of the negative slope. Default: 0.01.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+ + \[\text{leakyRelu}(x) = \max(0, x) + \text{negativeSlope} * \min(0, x)\] + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor from the .NET data in
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.linspaceLike (startVal, endVal, steps, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + endVal + + : + int
+
+ + + + steps + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor in the manner of
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.linspaceLike (startVal, endVal, steps, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+
+ + + + endVal + + : + float
+
+ + + + steps + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor in the manner of
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the natural logarithm of the elements of input. + ++ \[y_{i} = \log_{e} (x_{i})\] + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the logarithm to the base 10 of the elements of input. + ++ \[y_{i} = \log_{10} (x_{i})\] + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.logsoftmax dim
+ + + Parameters: +
int
+ -
+ A dimension along which softmax will be computed.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.logspaceLike (startVal, endVal, steps, ?baseVal, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + endVal + + : + int
+
+ + + + steps + + : + int
+
+ + + + ?baseVal + + : + int
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor in the manner of
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.logspaceLike (startVal, endVal, steps, ?baseVal, ?device, ?dtype, ?backend)
+ + + Parameters: +
float
+
+ + + + endVal + + : + float
+
+ + + + steps + + : + int
+
+ + + + ?baseVal + + : + float
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor in the manner of
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.logsumexp (dim, ?keepDim)
+ + + Parameters: +
int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+ Computes element-wise \(a < b\), returning a boolean tensor containing a
|
+
+
+
+
+
+
+ |
+
+
+ + + The behavior depends on the dimensionality of the tensors as follows: + + If both tensors are 1-dimensional, the dot product (scalar) is returned. + + If both arguments are 2-dimensional, the matrix-matrix product is returned. + + If the first argument is 1-dimensional and the second argument is 2-dimensional, a 1 is prepended to its dimension for the purpose of the matrix multiply. After the matrix multiply, the prepended dimension is removed. + + If the first argument is 2-dimensional and the second argument is 1-dimensional, the matrix-vector product is returned. + + If both arguments are at least 1-dimensional and at least one argument is N-dimensional (where N > 2), then a + batched matrix multiply is returned. If the first argument is 1-dimensional, a 1 is prepended to its dimension for the + purpose of the batched matrix multiply and removed after. If the second argument is 1-dimensional, a 1 is appended to + its dimension for the purpose of the batched matrix multiple and removed after. The non-matrix (i.e. batch) dimensions + are broadcasted (and thus must be broadcastable). For example, if input is a (j \times 1 \times n \times m)(j×1×n×m) + tensor and other is a (k \times m \times p)(k×m×p) tensor, out will be an (j \times k \times n \times p)(j×k×n×p) + tensor. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise maximum of the elements in the two tensors. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.max (dim, ?keepDim)
+ + + Parameters: +
int
+
+ + + + ?keepDim + + : + bool
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the maximum value along the given dimension of all elements in the input tensor. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxpool1d (kernelSize, ?stride, ?padding)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D max pooling over an input signal composed of several input planes. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxpool1di (kernelSize, ?stride, ?padding)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 1D max pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxpool2d (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D max pooling over an input signal composed of several input planes. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxpool2di (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 2D max pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxpool3d (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSizes.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D max pooling over an input signal composed of several input planes. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxpool3di (?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings)
+ + + Parameters: +
int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSize.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + Returns: + Tensor * Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Applies a 3D max pooling over an input signal composed of several input planes, returning the max indices along with the outputs. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxunpool1d (indices, kernelSize, ?stride, ?padding, ?outputSize)
+ + + Parameters: +
Tensor
+ -
+ The indices selected by maxpool1di.
+
+ + + + kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?outputSize + + : + seq<int>
+ -
+ The targeted output size.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxunpool2d (indices, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings, ?outputSize)
+ + + Parameters: +
Tensor
+ -
+ The indices selected by maxpool2di.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSizes.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + ?outputSize + + : + seq<int>
+ -
+ The targeted output size.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.maxunpool3d (indices, ?kernelSize, ?stride, ?padding, ?kernelSizes, ?strides, ?paddings, ?outputSize)
+ + + Parameters: +
Tensor
+ -
+ The indices selected by maxpool3di.
+
+ + + + ?kernelSize + + : + int
+ -
+ The size of the window to take a max over.
+
+ + + + ?stride + + : + int
+ -
+ The stride of the window. Default value is kernelSize.
+
+ + + + ?padding + + : + int
+ -
+ The implicit zero padding to be added on both sides.
+
+ + + + ?kernelSizes + + : + seq<int>
+ -
+ The sizes of the window to take a max over.
+
+ + + + ?strides + + : + seq<int>
+ -
+ The strides of the window. Default value is kernelSizes.
+
+ + + + ?paddings + + : + seq<int>
+ -
+ The implicit zero paddings to be added on corresponding sides.
+
+ + + + ?outputSize + + : + seq<int>
+ -
+ The targeted output size.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.mean (dim, ?keepDim)
+ + + Parameters: +
int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the mean value of each row of the input tensor in the given dimension dim. + ++ If keepdim is True, the output tensor is of the same size as input except in the dimension dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 fewer dimension. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.memorySize
+ + + + Returns: + int64
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the size in bytes of the total memory used by this tensor. Depending on dtype, backend configuration, this is not guaranteed to be correct and can behave differently in different runtime environments. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the element-wise minimum of the elements in the two tensors. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.min (dim, ?keepDim)
+ + + Parameters: +
int
+
+ + + + ?keepDim + + : + bool
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the minimum value along the given dimension of all elements in the input tensor. + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with the same contents moved to the given configuration + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with the same contents moved to the given device + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with the same contents moved to the given backend + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.mseLoss (target, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The target tensor.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Creates a criterion that measures the mean squared error (squared L2 norm) between each element in the input and the target. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Multiplies each element of the object tensor by the scalar b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Multiplies each element of the object tensor by the corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.multinomial (numSamples, ?normalize, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+ -
+ The number of samples to draw.
+
+ + + + ?normalize + + : + bool
+ -
+ Indicates where the probabilities should first be normalized by their sum.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor where each row contains numSamples indices sampled from the multinomial probability distribution located in the corresponding row of tensor input. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+ Computes element-wise \(a \neq b\), returning a boolean tensor containing a
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the negative of the elements of the object tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.nelement
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.nestingTag
+ + + + Returns: + uint32
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.nllLoss (target, ?weight, ?reduction)
+ + + Parameters: +
Tensor
+ -
+ The target tensor.
+
+ + + + ?weight + + : + Tensor
+ -
+ A optional manual rescaling weight given to the loss of each batch element.
+
+ + + + ?reduction + + : + string
+ -
+ Optionally specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the input tensor but with any support for automatic differentiation removed. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a scalar '1' tensor for the given element type and configuration, defaulting to + the element type and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]()
+
+ Returns a tensor in the manner of
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor filled with '1' values for the given shape, element type and configuration, defaulting to the + shape and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.pad paddings
+ + + Parameters: +
seq<int>
+ -
+ The implicit paddings on corresponding sides of the input.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Gets the parent operation of a tensor used in reverse-mode differentiation + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.permute permutation
+ + + Parameters: +
seq<int>
+ -
+ The desired ordering of dimensions.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises each element of the self tensor to the power of the scalar b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises each element of the self tensor to the power of each corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with random values drawn from the uniform distribution [0,1) for the + given shape, element type and configuration, defaulting to the shape and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.randintLike (low, high, ?shape, ?device, ?dtype, ?backend)
+ + + Parameters: +
int
+
+ + + + high + + : + int
+
+ + + + ?shape + + : + seq<int>
+
+ + + + ?device + + : + Device
+
+ + + + ?dtype + + : + Dtype
+
+ + + + ?backend + + : + Backend
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with random integer values drawn from the given range, for the + given shape, element type and configuration, defaulting to the shape and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor with random values drawn from the standard normal distribution, for the + given shape, element type and configuration, defaulting to the shape and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.repeat (dim, times)
+ + + Parameters: +
int
+ -
+ The dimension along which to repeat values.
+
+ + + + times + + : + int
+ -
+ The number of repetitions for each element.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.reverse (?value, ?zeroDerivatives)
+ + + Parameters: +
Tensor
+ -
+ The derivative value to propagate backwards. Should have the same shape with this tensor.
+
+ + + + ?zeroDerivatives + + : + bool
+ -
+ Indicates whether any existing derivatives in the computation graph (for example from a previous reverse propagation that was executed) should be zeroed or not before starting this propagation. Default: true
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Propagate the reverse-mode derivative backwards in the computation graph, starting from this tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.reverseDiff (?derivative, ?nestingTag)
+ + + Parameters: +
Tensor
+ -
+ The derivative (adjoint) to assign to the new reverse-mode tensor. Defaults to an empty placeholder tensor.
+
+ + + + ?nestingTag + + : + uint32
+ -
+ The level nestingTag for nested differentiation. Defaults to the current global nesting level
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the input tensor with added support for reverse-mode automatic differentiation. + + +
+
+ Any tensors produced using this tensor will also support reverse-mode propagation. After the completion
+ of the corresponding
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.reversePush value
+ + + Parameters: +
Tensor
+ -
+ The value to apply.
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Push the given value as part of the reverse-mode computation at the given output tensor. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.reverseReset zeroDerivatives
+ + + Parameters: +
bool
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Reset the reverse mode computation graph associated with the given output tensor. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with each of the elements of input rounded to the closest integer. + ++ The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.safelog ?epsilon
+ + + Parameters: +
float
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the logarithm of the tensor after clamping the tensor so that all its elements are greater than epsilon. This is to avoid a -inf result for elements equal to zero. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.save fileName
+ + + Parameters: +
string
+
+ + + |
+
+
+ + + The binary format records the elements, backend, element type and shape. It does not record the device. + The format used may change from version to version of Furnace. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new scalar tensor for the given shape, element type and configuration, defaulting to the + shape and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.scatter (dim, indices, destinationShape)
+ + + Parameters: +
int
+ -
+ The axis along which to index.
+
+ + + + indices + + : + Tensor
+ -
+ The the indices of elements to gather.
+
+ + + + destinationShape + + : + seq<int>
+ -
+ The destination shape.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+ + \[\text{sigmoid}(x) = \frac{1}{1 + \exp(-x)}\] + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+ + The tensor will have the same element type as the input tensor. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the hyperbolic sine of the elements of input. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.softmax dim
+ + + Parameters: +
int
+ -
+ A dimension along which softmax will be computed.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+ + Softmax is defined as: \text{softmax}(x_{i}) = \frac{\exp(x_i)}{\sum_j \exp(x_j)}. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+ + \[\text{softplus}(x) = \frac{1}{\beta} * \log(1 + \exp(\beta * x))\] + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.split (sizes, ?dim)
+ + + Parameters: +
seq<int>
+ -
+ List of sizes for each chunk
+
+ + + + ?dim + + : + int
+ -
+ The dimension along which to split the tensor, defaults to 0.
+
+ + + + Returns: + Tensor[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Splits the tensor into chunks. Each chunk is a view of the original tensor. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.squeeze ?dim
+ + + Parameters: +
int
+ -
+ If given, the input will be squeezed only in this dimension.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor with all the dimensions of input of size 1 removed. + ++ If the tensor has a batch dimension of size 1, then squeeze(input) will also remove the batch dimension, which can lead to unexpected errors. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns the tensor after standardization (z-score normalization) + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.std ?unbiased
+ + + Parameters: +
bool
+ -
+ Whether to use the unbiased estimation or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+ + If unbiased is False, then the standard deviation will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.std (dim, ?keepDim, ?unbiased)
+ + + Parameters: +
int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + ?unbiased + + : + bool
+ -
+ Whether to use the unbiased estimation or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the standard deviation of each row of the input tensor in the given dimension dim. + ++ If keepdim is True, the output tensor is of the same size as input except in the dimension dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 fewer dimension(s). If unbiased is False, then the standard deviation will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Subtracts the scalar b from the corresponding element of the object tensor. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Subtracts each element of the object tensor from the corresponding element of the self tensor. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.sum (dim, ?keepDim, ?dtype)
+ + + Parameters: +
int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired data type of returned tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the sum of each row of the input tensor in the given dimension dim. If dim is a list of dimensions, reduce over all of them. + +
+ If keepdim is
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Sum this tensor to size newShape, which must be broadcastable to this tensor size. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.summary ()
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the hyperbolic tangent of the elements of input. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toArray1D ()
+ + + + Returns: + 'T[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toArray2D ()
+ + + + Returns: + 'T[,]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toArray3D ()
+ + + + Returns: + 'T[,,]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toArray4D ()
+ + + + Returns: + 'T[,,,]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toBool ()
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toByte ()
+ + + + Returns: + byte
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toDouble ()
+ + + + Returns: + float
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toImage (?pixelMin, ?pixelMax, ?normalize, ?gridCols)
+ + + Parameters: +
double
+
+ + + + ?pixelMax + + : + double
+
+ + + + ?normalize + + : + bool
+
+ + + + ?gridCols + + : + int
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Convert tensor to an image tensor with shape Channels x Height x Width + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toImageString (?pixelMin, ?pixelMax, ?normalize, ?gridCols, ?asciiPalette)
+ + + Parameters: +
double
+
+ + + + ?pixelMax + + : + double
+
+ + + + ?normalize + + : + bool
+
+ + + + ?gridCols + + : + int
+
+ + + + ?asciiPalette + + : + string
+
+ + + + Returns: + string
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Convert tensor to a grayscale image tensor and return a string representation approximating grayscale values + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toInt16 ()
+ + + + Returns: + int16
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toInt32 ()
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toInt64 ()
+ + + + Returns: + int64
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toSByte ()
+ + + + Returns: + sbyte
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.toSingle ()
+ + + + Returns: + float32
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the sum of the elements of the diagonal of the input 2-D matrix. + +
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor that is a transposed version of input with dimensions 0 and 1 swapped. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.transpose (dim0, dim1)
+ + + Parameters: +
int
+ -
+ The first dimension to be transposed.
+
+ + + + dim1 + + : + int
+ -
+ The second dimension to be transposed.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a tensor that is a transposed version of input. The given dimensions dim0 and dim1 are swapped. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.undilate dilations
+ + + Parameters: +
seq<int>
+ -
+ The dilations to use.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Reverse the dilation of the tensor in using the given dilations in each corresponding dimension. + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.unflatten (dim, unflattenedShape)
+ + + Parameters: +
int
+ -
+ The dimension to unflatten.
+
+ + + + unflattenedShape + + : + seq<int>
+ -
+ New shape of the unflattened dimenension.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.unsqueeze dim
+ + + Parameters: +
int
+ -
+ The index at which to insert the singleton dimension.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with a dimension of size one inserted at the specified position + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with dimensions of size one appended to the end until the number of dimensions is the same as the other tensor. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.unstack ?dim
+ + + Parameters: +
int
+ -
+ The dimension to remove, defaults to 0.
+
+ + + + Returns: + Tensor[]
+
+ Returns an array of all slices along a given dimension.
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.var (dim, ?keepDim, ?unbiased)
+ + + Parameters: +
int
+ -
+ The dimension to reduce.
+
+ + + + ?keepDim + + : + bool
+ -
+ Whether the output tensor has dim retained or not.
+
+ + + + ?unbiased + + : + bool
+ -
+ Whether to use the unbiased estimation or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns the variance of each row of the input tensor in the given dimension dim. + ++ If keepdim is True, the output tensor is of the same size as input except in the dimension dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 fewer dimension(s). If unbiased is False, then the variance will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.var ?unbiased
+ + + Parameters: +
bool
+ -
+ Whether to use the unbiased estimation or not.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+ + If unbiased is False, then the variance will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.view shape
+ + + Parameters: +
int
+ -
+ the desired shape
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the same data as the object tensor but of a different shape. + ++ + The returned tensor shares the same data and must have the same number of elements, but may have a different size. + For a tensor to be viewed, the new view size must be compatible with its original size and stride, i.e., each new view dimension must either be a subspace of an original dimension, + or only span across original dimensions \(d, d+1, \dots, d+kd,d+1,…,d+k\) that satisfy the following contiguity-like condition that + \(\forall i = d, \dots, d+k-1∀i=d,…,d+k−1 ,\) \[\text{stride}[i] = \text{stride}[i+1] \times \text{size}[i+1]\] + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.view shape
+ + + Parameters: +
seq<int>
+ -
+ The desired shape of returned tensor.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Returns a new tensor with the same data as the self tensor but of a different shape. + ++ + The returned tensor shares the same data and must have the same number of elements, but may have a different size. + For a tensor to be viewed, the new view size must be compatible with its original size and stride, i.e., each new view dimension must either be a subspace of an original dimension, + or only span across original dimensions \(d, d+1, \dots, d+kd,d+1,…,d+k\) that satisfy the following contiguity-like condition that + \(\forall i = d, \dots, d+k-1∀i=d,…,d+k−1 ,\) \[\text{stride}[i] = \text{stride}[i+1] \times \text{size}[i+1]\] + + +
|
+
+
+
+
+
+
+ |
+
+
+ + The returned tensor shares the same data and must have the same number of elements, but may have a different size. For a tensor to be viewed, the new view size must be compatible with its original size. + The returned tensor shares the same data and must have the same number of elements, but may have a different size. + For a tensor to be viewed, the new view size must be compatible with its original size and stride, i.e., each new view dimension must either be a subspace of an original dimension, + or only span across original dimensions \(d, d+1, \dots, d+kd,d+1,…,d+k\) that satisfy the following contiguity-like condition that + \(\forall i = d, \dots, d+k-1∀i=d,…,d+k−1 ,\) \[\text{stride}[i] = \text{stride}[i+1] \times \text{size}[i+1]\] + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a scalar '0' tensor for the given element type and configuration, defaulting to + the element type and configuration of the input tensor. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a new tensor filled with '0' values for the given shape, element type and configuration, defaulting to the + shape and configuration of the input tensor. + + +
|
+
+ Static member + | ++ Description + | +
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Multiplies the scalar a by each element of the tensor b. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Multiplies each element of the tensor a by the scalar b. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Multiplies each element of the tensor a by the corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + The scalar a is added to each element of the tensor b. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Each element of the tensor a is added to the scalar b. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Each element of the tensor a is added to each corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Subtracts each element of the tensore b from the scalar a. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Subtracts the scalar b from the corresponding element of the tensor a. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Subtracts each element of the tensor b from the corresponding element of the tensor a. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + + +
|
+
+
+
+
+
+
+ |
+
+
+
+
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Divides the scalar a by the each element of the tensor b. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Divides each element of the tensor a by the scalar b. The resulting tensor is returned. + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Divides each element of the tensor a by the corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + + +
|
+
+ + | +
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ + | +
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises the scalar a to the power of each element of the tensor b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises the scalar a to the power of each element of the tensor b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises the scalar a to the power of each element of the tensor b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises each element of the tensor a to the power of the scalar b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises each element of the tensor a to the power of the scalar b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises each element of the tensor a to the power of the scalar b. The resulting tensor is returned. + +
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Raises each element of the tensor a to the power of the corresponding element of the tensor b. The resulting tensor is returned. + ++ The shapes of the two tensors must be broadcastable. + + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Concatenates the given sequence of seq tensors in the given dimension. + ++ All tensors must either have the same shape (except in the concatenating dimension) or be empty. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Tensor.create (value, ?device, ?dtype, ?backend)
+ + + Parameters: +
obj
+ -
+ The .NET object used to form the initial values for the tensor.
+
+ + + + ?device + + : + Device
+ -
+ The desired device of returned tensor. Default: if None, uses Device.Default.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The desired element type of returned tensor. Default: if None, uses Dtype.Default.
+
+ + + + ?backend + + : + Backend
+ -
+ The desired backend of returned tensor. Default: if None, uses Backend.Default.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Creates a new tensor from the given data, using the given element type and configuration. + + ++ The fastest creation technique is a one dimensional array matching the desired dtype. Then use 'view' to reshape. + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Tensor.load (fileName, ?device, ?dtype, ?backend)
+ + + Parameters: +
string
+ -
+ The file from which to load the tensor.
+
+ + + + ?device + + : + Device
+ -
+ The device of the resulting tensor. Defaults to the current default device.
+
+ + + + ?dtype + + : + Dtype
+ -
+ The element type of the resulting tensor. Defaults to the element type of the saved tensor.
+
+ + + + ?backend + + : + Backend
+ -
+ The device of the resulting tensor. Defaults to the current default backend.
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Loads the tensor from the given file using the given element type and configuration. + ++ + The backend at the time of saving the tensor must be available when the tensor is reloaded. + The tensor is first loaded into that backend and then moved. As a result, intermediate tensors may be created + in the process of reloading. + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + int64
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + int32
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + int16
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + int8
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + byte
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + double
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ op_Explicittensor
+ + + Parameters: +
Tensor
+
+ + + + Returns: + single
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Tensor.stack (tensors, ?dim)
+ + + Parameters: +
seq<Tensor>
+ -
+ sequence of tensors to concatenate
+
+ + + + ?dim + + : + int
+ -
+ dimension to insert. Has to be between 0 and the number of dimensions of concatenated tensors (inclusive)
+
+ + + + Returns: + Tensor
+
+ + |
+
+
+ + All tensors need to be of the same shape. + +
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ OpBinaryTT(Tensor, Tensor, Tensor * Tensor * Tensor * Tensor -> Tensor * Tensor, string)
+ + + Parameters: +
Tensor
+
+ + + + Item2 + + : + Tensor
+
+ + + + Item3 + + : + Tensor * Tensor * Tensor * Tensor -> Tensor * Tensor
+
+ + + + Item4 + + : + string
+
+ + + |
+
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+ + | +
+
+
+
+
+ ![]() ![]() + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
+
+
+
+
+
+
+ |
+
+
+
+
+ ![]() ![]() + + +
|
+
© Copyright 2025, Furnace Contributors.
++ Defines a new op implementing a unary function and its derivatives. Instances of this class are used with the Tensor.Op method to define a new differentiable tensor function that supports forward, reverse, and nested differentiation. +
++
This type represents the most generic definition of a new op representing a unary function, allowing the specification of: (1) the RawTensor operation, (2) the derivative propagation rule for the forward differentiation mode and (3) the derivative propagation rule for the reverse differentiation mode.
In general, if you are implementing a simple elementwise op, you should prefer using the UnaryOpElementwise type, which is much simpler to use.
+ ++
+ { new UnaryOp("transpose") with + member _.fRaw(a) = a.TransposeT2() + member _.ad_dfda(a,ad,f) = ad.transpose() + member _.fd_dfda(a,f,fd) = fd.transpose() + }+ +
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ UnaryOp(name)
+ + + Parameters: +
string
+
+ + + + Returns: + UnaryOp
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ad_dfda (a, ad, f)
+ + + Parameters: +
Tensor
+ -
+ The argument \( a \).
+
+ + + + ad + + : + Tensor
+ -
+ The argument's derivative \( \frac{\partial a}{\partial x} \).
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial f(a)}{\partial x} = \frac{\partial a}{\partial x} \frac{\partial f(a)}{\partial a} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative propagation rule for forward differentiation mode. This represents the derivative of \( f(a) \) with respect a value \( x \) earlier in the computation graph than the function's argument \( a \). In other words, it computes \( \frac{\partial f(a)}{\partial x} = \frac{\partial a}{\partial x} \frac{\partial f(a)}{\partial a} \). + +
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.fd_dfda (a, f, fd)
+ + + Parameters: +
Tensor
+ -
+ The argument \( a \).
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + fd + + : + Tensor
+ -
+ The derivative with respect to the function's output \( \frac{\partial y}{\partial f(a)} \).
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial y}{\partial a} = \frac{\partial y}{\partial f(a)} \frac{\partial f(a)}{\partial a} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative propagation rule for reverse differentiation mode. This represents the derivative of a value \( y \), which comes later in the computation graph than the function's value \( f(a) \), with respect to the function's argument \( a \). In other words, it computes \( \frac{\partial y}{\partial a} = \frac{\partial y}{\partial f(a)} \frac{\partial f(a)}{\partial a} \). + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.name
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ Defines a new op implementing an elementwise unary function and its derivatives. Instances of this class are used with the Tensor.Op method to define a new differentiable tensor function that supports forward, reverse, and nested differentiation. +
++
This type is specialized to elementwise ops. It requires the user to specify only (1) the RawTensor operation and (2) the derivative of the function with respect to its argument. The corresponding derivative propagation rules for the forward and reverse differentiation modes are automatically generated.
If you are implementing a complex op that is not elementwise, you can use the generic type UnaryOp, which allows you to define the full derivative propagation rules.
+ ++
+ { new UnaryOpElementwise("cos") with + member _.fRaw(a) = a.CosT() + member _.dfda(a,f) = -a.sin() + } + + { new UnaryOpElementwise("exp") with + member _.fRaw(a) = a.ExpT() + member _.dfda(a,f) = f + } + + { new UnaryOpElementwise("log") with + member _.fRaw(a) = a.LogT() + member _.dfda(a,f) = 1/a + }+ +
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ UnaryOpElementwise(name)
+ + + Parameters: +
string
+
+ + + + Returns: + UnaryOpElementwise
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.dfda (a, f)
+ + + Parameters: +
Tensor
+ -
+ The argument \( a \)
+
+ + + + f + + : + Tensor
+ -
+ The function's pre-computed primal evaluation result \( f(a) \), which can be one of the terms involved in the derivative computation (e.g., the derivative of the exponential function) and be used without the need to recompute it.
+
+ + + + Returns: + Tensor
+
+ The tensor corresponding to \( \frac{\partial f(a)}{\partial a} \).
+ + Modifiers: + abstract + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + Derivative of the function with respect to its argument, \( \frac{\partial f(a)}{\partial a} \). + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains extensions to the F# Array module. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ allClose relativeTolerance absoluteTolerance array1 array2
+ + + Parameters: +
^T
+
+ + + + absoluteTolerance + + : + ^T
+
+ + + + array1 + + : + ^T[]
+
+ + + + array2 + + : + ^T[]
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Determines if all values of the first array lie within the given tolerances of the second array. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ cumulativeSum a
+ + + Parameters: +
^d[]
+
+ + + + Returns: + ^e[]
+
+ + Modifiers: + inline + + Type parameters: + ^d, ^e + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ foralli f arr
+ + + Parameters: +
int -> 'T -> bool
+
+ + + + arr + + : + 'T[]
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ getUniqueCounts sorted values
+ + + Parameters: +
bool
+
+ + + + values + + : + 'T[]
+
+ + + + Returns: + 'T[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ initFlat2D i j f
+ + + Parameters: +
int
+
+ + + + j + + : + int
+
+ + + + f + + : + int -> int -> 'a
+
+ + + + Returns: + 'a[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ initFlat3D i j k f
+ + + Parameters: +
int
+
+ + + + j + + : + int
+
+ + + + k + + : + int
+
+ + + + f + + : + int -> int -> int -> 'a
+
+ + + + Returns: + 'a[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ insertManyAt index values source
+ + + Parameters: +
int
+
+ + + + values + + : + seq<'T>
+
+ + + + source + + : + 'T[]
+
+ + + + Returns: + 'T[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ removeAt index source
+ + + Parameters: +
int
+
+ + + + source + + : + 'T[]
+
+ + + + Returns: + 'T[]
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ map mapping array
+ + + Parameters: +
'a -> 'b
+
+ + + + array + + : + 'a[,,,]
+
+ + + + Returns: + 'b[,,,]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Builds a new array whose elements are the results of applying the given function to each of the elements of the array. + + +
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ create length1 length2 length3 length4 length5 initial
+ + + Parameters: +
int
+
+ + + + length2 + + : + int
+
+ + + + length3 + + : + int
+
+ + + + length4 + + : + int
+
+ + + + length5 + + : + int
+
+ + + + initial + + : + 'T
+
+ + + + Returns: + Array
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ get array index1 index2 index3 index4 index5
+ + + Parameters: +
Array
+
+ + + + index1 + + : + int
+
+ + + + index2 + + : + int
+
+ + + + index3 + + : + int
+
+ + + + index4 + + : + int
+
+ + + + index5 + + : + int
+
+ + + + Returns: + obj
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ init length1 length2 length3 length4 length5 initializer
+ + + Parameters: +
int
+
+ + + + length2 + + : + int
+
+ + + + length3 + + : + int
+
+ + + + length4 + + : + int
+
+ + + + length5 + + : + int
+
+ + + + initializer + + : + int -> int -> int -> int -> int -> 'T
+
+ + + + Returns: + Array
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length1 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length2 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length3 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length4 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length5 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ set array index1 index2 index3 index4 index5 value
+ + + Parameters: +
Array
+
+ + + + index1 + + : + int
+
+ + + + index2 + + : + int
+
+ + + + index3 + + : + int
+
+ + + + index4 + + : + int
+
+ + + + index5 + + : + int
+
+ + + + value + + : + 'a
+
+ + + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ create length1 length2 length3 length4 length5 length6 initial
+ + + Parameters: +
int
+
+ + + + length2 + + : + int
+
+ + + + length3 + + : + int
+
+ + + + length4 + + : + int
+
+ + + + length5 + + : + int
+
+ + + + length6 + + : + int
+
+ + + + initial + + : + 'T
+
+ + + + Returns: + Array
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ get array index1 index2 index3 index4 index5 index6
+ + + Parameters: +
Array
+
+ + + + index1 + + : + int
+
+ + + + index2 + + : + int
+
+ + + + index3 + + : + int
+
+ + + + index4 + + : + int
+
+ + + + index5 + + : + int
+
+ + + + index6 + + : + int
+
+ + + + Returns: + obj
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ init length1 length2 length3 length4 length5 length6 initializer
+ + + Parameters: +
int
+
+ + + + length2 + + : + int
+
+ + + + length3 + + : + int
+
+ + + + length4 + + : + int
+
+ + + + length5 + + : + int
+
+ + + + length6 + + : + int
+
+ + + + initializer + + : + int -> int -> int -> int -> int -> int -> 'T
+
+ + + + Returns: + Array
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length1 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length2 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length3 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length4 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length5 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ length6 array
+ + + Parameters: +
Array
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ set array index1 index2 index3 index4 index5 index6 value
+ + + Parameters: +
Array
+
+ + + + index1 + + : + int
+
+ + + + index2 + + : + int
+
+ + + + index3 + + : + int
+
+ + + + index4 + + : + int
+
+ + + + index5 + + : + int
+
+ + + + index6 + + : + int
+
+ + + + value + + : + 'a
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ zeroCreate length1 length2 length3 length4 length5 length6
+ + + Parameters: +
int
+
+ + + + length2 + + : + int
+
+ + + + length3 + + : + int
+
+ + + + length4 + + : + int
+
+ + + + length5 + + : + int
+
+ + + + length6 + + : + int
+
+ + + + Returns: + Array
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ init shape f
+ + + Parameters: +
int[]
+
+ + + + f + + : + int[] -> 'T
+
+ + + + Returns: + obj
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Initializes an array with a given shape and initializer function. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ zeroCreate shape
+ + + Parameters: +
int[]
+
+ + + + Returns: + Array
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Initializes an array with a given shape and initializer function. + + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains operations relating to converting .NET data to tensor data. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValues ofFloat32 ofFloat64 ofInt8 ofInt16 ofInt32 ofInt64 ofBool ofByte value
+ + + Parameters: +
float32 -> ^T
+
+ + + + ofFloat64 + + : + double -> ^T
+
+ + + + ofInt8 + + : + int8 -> ^T
+
+ + + + ofInt16 + + : + int16 -> ^T
+
+ + + + ofInt32 + + : + int32 -> ^T
+
+ + + + ofInt64 + + : + int64 -> ^T
+
+ + + + ofBool + + : + bool -> ^T
+
+ + + + ofByte + + : + byte -> ^T
+
+ + + + value + + : + obj
+
+ + + + Returns: + ^T[] * int[]
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForBool value
+ + + Parameters: +
obj
+
+ + + + Returns: + bool[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForByte value
+ + + Parameters: +
obj
+
+ + + + Returns: + byte[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForFloat32 value
+ + + Parameters: +
obj
+
+ + + + Returns: + float32[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForFloat64 value
+ + + Parameters: +
obj
+
+ + + + Returns: + double[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForInt16 value
+ + + Parameters: +
obj
+
+ + + + Returns: + int16[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForInt32 value
+ + + Parameters: +
obj
+
+ + + + Returns: + int32[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForInt64 value
+ + + Parameters: +
obj
+
+ + + + Returns: + int64[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dataOfValuesForInt8 value
+ + + Parameters: +
obj
+
+ + + + Returns: + int8[] * int[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ formatType ty
+ + + Parameters: +
Type
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ tryFlatArrayAndShape value
+ + + Parameters: +
obj
+
+ + + + Returns: + ('T[] * int[]) option
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ typesMatch array
+ + + Parameters: +
Array
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains extensions related to .NET Dictionary. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ copyKeys dictionary
+ + + Parameters: +
Dictionary<'Key, 'Value>
+
+ + + + Returns: + 'Key[]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ copyValues dictionary
+ + + Parameters: +
Dictionary<'Key, 'Value>
+
+ + + + Returns: + 'Value[]
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains auto-opened extensions to the F# programming model. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ array3D data
+ + + Parameters: +
seq<'a>
+
+ + + + Returns: + 'c[,,]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ array4D data
+ + + Parameters: +
seq<'a>
+
+ + + + Returns: + 'd[,,,]
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ array5D data
+ + + Parameters: +
seq<'a>
+
+ + + + Returns: + Array
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ array6D data
+ + + Parameters: +
seq<'a>
+
+ + + + Returns: + Array
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ notNull value
+ + + Parameters: +
'a
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ print x
+ + + Parameters: +
'a
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Print the given value to the console using the '%A' printf format specifier + + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains operations to get, set or reset the global nesting level for differentiation operations. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GlobalNestingLevel.Current
+ + + + Returns: + uint32
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GlobalNestingLevel.Next()
+ + + + Returns: + uint32
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GlobalNestingLevel.Reset()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GlobalNestingLevel.Set(level)
+ + + Parameters: +
uint32
+
+ + + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ printVal x
+ + + Parameters: +
scalar
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ runScript executable lines timeoutMilliseconds
+ + + Parameters: +
string
+
+ + + + lines + + : + string[]
+
+ + + + timeoutMilliseconds + + : + int
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ toPython v
+ + + Parameters: +
obj
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Represents a differentiation nesting level. + +
++ Record Field + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Current
+ + + + Field type: + uint32
+
+ + Modifiers: + mutable + + |
+
+
+
+
+ ![]() ![]() + + +
|
+
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Next
+ + + + Returns: + uint32
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains extensions related to .NET OrderedDictionary. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ copyKeys dictionary
+ + + Parameters: +
OrderedDictionary
+
+ + + + Returns: + 'b[]
+
+ + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Pyplot(?pythonExecutable, ?timeoutMilliseconds)
+ + + Parameters: +
string
+
+ + + + ?timeoutMilliseconds + + : + int
+
+ + + + Returns: + Pyplot
+
+ + |
+
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.addPython line
+ + + Parameters: +
string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.figure ?figSize
+ + + Parameters: +
float * float
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.legend ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.plot (y, ?alpha, ?label)
+ + + Parameters: +
Tensor
+
+ + + + ?alpha + + : + float
+
+ + + + ?label + + : + string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+ |
+ + + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.savefig fileName
+ + + Parameters: +
string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.script
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.tightLayout ()
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.xlabel label
+ + + Parameters: +
string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.xscale value
+ + + Parameters: +
string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ylabel label
+ + + Parameters: +
string
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.yscale value
+ + + Parameters: +
string
+
+ + + |
+
+
+
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains operations relating to pseudo-random number generation. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Bernoulli()
+ + + + Returns: + float
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Bernoulli(prob)
+ + + Parameters: +
float
+
+ + + + Returns: + float
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples a random value from the Bernoulli distribution with the given probability. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Choice(array, probs)
+ + + Parameters: +
'a[]
+
+ + + + probs + + : + float[]
+
+ + + + Returns: + 'a
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples a value at random from the given array using the given categorical probabilities. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Choice(array)
+ + + Parameters: +
'a[]
+
+ + + + Returns: + 'a
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.ChoiceIndex(probs)
+ + + Parameters: +
float[]
+
+ + + + Returns: + int
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples an index at random with the given categorical probabilities. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Double(low, high)
+ + + Parameters: +
float
+
+ + + + high + + : + float
+
+ + + + Returns: + float
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Double()
+ + + + Returns: + float
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Integer(low, high)
+ + + Parameters: +
int
+
+ + + + high + + : + int
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Integer()
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Multinomial(probs, numSamples)
+ + + Parameters: +
float[,]
+
+ + + + numSamples + + : + int
+
+ + + + Returns: + int[,]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a 2D array where each row contains `numSamples` indices sampled from the multinomial probability distribution defined by the probabilities in the corresponding row of the `probs` array. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Multinomial(probs, numSamples)
+ + + Parameters: +
float[]
+
+ + + + numSamples + + : + int
+
+ + + + Returns: + int[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples a number of random values array of random values for the given weighted distribution + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Normal(mean, stddev)
+ + + Parameters: +
float
+
+ + + + stddev + + : + float
+
+ + + + Returns: + float
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples a random value from the normal distribution with the given mean and standard deviation. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Normal()
+ + + + Returns: + float
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples a random value from the standard normal distribution with mean 0 and standard deviation 1. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Seed(seed)
+ + + Parameters: +
int
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Shuffle(array)
+ + + Parameters: +
'a[]
+
+ + + + Returns: + 'a[]
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns an array that is a randomly-shuffled version of the given array, using the Durstenfeld/Knuth shuffle. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.UUID()
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Uniform(low, high)
+ + + Parameters: +
float
+
+ + + + high + + : + float
+
+ + + + Returns: + float
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples a random value from the uniform distribution with the given parameters [low, high). + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Random.Uniform()
+ + + + Returns: + float
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Samples a random value from the standard uniform distribution over the interval [0,1). + + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains operations relating to pseudo-random number generation. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ shuffledIndices length
+ + + Parameters: +
int
+
+ + + + Returns: + int -> int
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a function that maps a given index to a shuffled version of the indexes up to the given `length` + + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains extensions to the F# Seq module. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ allEqual items
+ + + Parameters: +
seq<'T>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ duplicates l
+ + + Parameters: +
seq<'a>
+
+ + + + Returns: + 'a list
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ hasDuplicates l
+ + + Parameters: +
seq<'s>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ maxIndex seq
+ + + Parameters: +
seq<'a>
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ minIndex seq
+ + + Parameters: +
seq<'a>
+
+ + + + Returns: + int
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ toArrayQuick xs
+ + + Parameters: +
seq<'T>
+
+ + + + Returns: + 'T[]
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Like Seq.toArray but does not clone the array if the input is already an array + + +
|
+
© Copyright 2025, Furnace Contributors.
++ + Contains auto-opened utilities related to the Furnace programming model. + +
++ Function or value + | ++ Description + | +
+ + | +
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ r := v
+ + + Parameters: +
'T ref
+
+ + + + v + + : + 'T
+
+ + + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ bytesReadable i
+ + + Parameters: +
int64
+
+ + + + Returns: + string
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Return a human-readable string representation of the given value in Bytes. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ fileToBase64String fileName
+ + + Parameters: +
string
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ indentNewLines str numSpaces
+ + + Parameters: +
String
+
+ + + + numSpaces + + : + int
+
+ + + + Returns: + string
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Indents all lines of the given string by the given number of spaces. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ loadBinary fileName
+ + + Parameters: +
string
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Loads the given value from the given local file using binary serialization. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ log10Val
+ + + + Returns: + float
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ logSqrt2Pi
+ + + + Returns: + float
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ memoize fn
+ + + Parameters: +
'a -> 'b
+
+ + + + Returns: + 'a -> 'b
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Returns a function that memoizes the given function using a lookaside table. + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ pngToHtml fileName widthPixels
+ + + Parameters: +
string
+
+ + + + widthPixels + + : + int
+
+ + + + Returns: + string
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Given a PNG image file name, returns an HTML image element with the image content included as a Base64 encoded string + + +
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ saveBinary object fileName
+ + + Parameters: +
'T
+
+ + + + fileName + + : + string
+
+ + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Saves the given value to the given local file using binary serialization. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ stringPad s width
+ + + Parameters: +
string
+
+ + + + width + + : + int
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ stringPadAs s1 s2
+ + + Parameters: +
string
+
+ + + + s2 + + : + string
+
+ + + + Returns: + string
+
+ + |
+
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ thousandsFloat x
+ + + Parameters: +
float
+
+ + + + Returns: + string
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Formats an integer as a string with comma as thousands separator + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ thousandsInt x
+ + + Parameters: +
int
+
+ + + + Returns: + string
+
+ + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Formats an integer as a string with comma as thousands separator + + +
|
+
© Copyright 2025, Furnace Contributors.
++ Contains utilities and library extensions related to the Furnace programming model. +
++ Type/Module + | ++ Description + | +
+ + | ++ + | +
+ + + + Array4D + + + + |
+ + + | +
+ + + + Array5D + + + + |
+ + + | +
+ + + + Array6D + + + + |
+ + + | +
+ + + + ArrayND + + + + |
+ + + | +
+ + + + DataConverter + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains operations relating to converting .NET data to tensor data. + + + |
+
+ + + + Dictionary + + + + |
+ + + | +
+ + + + ExtensionAutoOpens + + + + |
+ + + | +
+ + + + GlobalNestingLevel + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains operations to get, set or reset the global nesting level for differentiation operations. + + + |
+
+ + + + helpers + + + + |
+ + + | +
+ + + + NestingLevel + + + + |
+ + + | +
+ + + + OrderedDictionary + + + + |
+ + + | +
+ + + + Pyplot + + + + |
+ + + | +
+ + + + Random (Module) + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains operations relating to pseudo-random number generation. + + + |
+
+ + + + Random (Type) + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains operations relating to pseudo-random number generation. + + + |
+
+ + | ++ + | +
+ + + + UtilAutoOpens + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains auto-opened utilities related to the Furnace programming model. + + + |
+
© Copyright 2025, Furnace Contributors.
++ Contains fundamental types for the tensor programming model, including Tensor, Shape and FurnaceImage. +
++ Type/Module + | ++ Description + | +
+ + + + Backend (Module) + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains functions and settings related to backend specifications. + + + |
+
+ + + + Backend (Type) + + + + |
+ + + | +
+ + | ++ + | +
+ + + + BinaryOp + + + + |
+ + + | +
+ + + + BinaryOpElementwise + + + + |
+ + + | +
+ + + + Compose + + + + |
+ + + | +
+ + + + Device (Module) + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains functions and settings related to device specifications. + + + |
+
+ + + + Device (Type) + + + + |
+ + + | +
+ + + + DeviceType + + + + |
+ + + | +
+ + + + Dtype (Module) + + + + |
+ + + | +
+ + + + Dtype (Type) + + + + |
+ + + | +
+ + + + DtypeAutoOpens + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Contains global functions and settings related to tensor element types, used when writing backends. + + + |
+
+ + + + FurnaceImage + + + + |
+ + + | +
+ + + + ImageExtensions + + + + |
+ + + | +
+ + + + ImageUtil + + + + |
+ + + | +
+ + + + Numerical + + + + |
+ + + | +
+ + + + OpAvgPoolExtensions + + + + |
+ + + | +
+ + + + OpBMMExtensions + + + + |
+ + + | +
+ + + + OpDetExtensions + + + + |
+ + + | +
+ + + + OpInvExtensions + + + + |
+ + + | +
+ + + + OpNormExtensions + + + + |
+ + + | +
+ + + + OpOuterExtensions + + + + |
+ + + | +
+ + + + OpSolveExtensions + + + + |
+ + + | +
+ + + + Printer (Module) + + + + |
+ + + | +
+ + + + Printer (Type) + + + + |
+ + + | +
+ + + + scalar + + + + |
+ + + | +
+ + + + ScalarExtensions + + + + |
+ + + | +
+ + + + Shape (Module) + + + + |
+ + + | +
+ + + + Shape (Type) + + + + |
+ + + | +
+ + + + ShapeAutoOpens + + + + |
+ + + | +
+ + + + Shorten + + + + |
+ + + | +
+ + + + SlicingExtensions + + + + |
+ + + | +
+ + + + Tensor + + + + |
+
+
+
+
+
+ ![]() ![]()
+
+
+ ![]() ![]() ![]() ![]() + + Represents a multi-dimensional data type containing elements of a single data type. + + + |
+
+ + + + TensorOp + + + + |
+ + + | +
+ + + + UnaryOp + + + + |
+ + + | +
+ + + + UnaryOpElementwise + + + + |
+ + + | +
© Copyright 2025, Furnace Contributors.
++ Namespace + | ++ Description + | +
+ + Furnace + + | ++ Contains fundamental types for the tensor programming model, including Tensor, Shape and FurnaceImage. + | +
+ + Furnace.Backends + + | ++ Contains types and functionality related to backend implementations for Furnace. + | +
+ + Furnace.Data + + | ++ Contains datasets and components related to data loading. + | +
+ + Furnace.Distributions + + | ++ Contains types and functionality related to probabilitity distributions. + | +
+ + Furnace.Model + + | ++ Contains types and functionality related to describing models. + | +
+ + Furnace.Optim + + | ++ Contains types and functionality related to optimizing models and functions. + | +
+ + Furnace.Util + + | ++ Contains utilities and library extensions related to the Furnace programming model. + | +
© Copyright 2025, Furnace Contributors.
+The FurnaceImage API
The Tensor type
Saving tensors as image and loading images as tensors
+System.Array and F# arrays
+open Furnace
+
+// Tensor
+let t1 = FurnaceImage.tensor [ 0.0 .. 0.2 .. 1.0 ]
+
+// System.Array
+let a1 = t1.toArray()
+
+// []<float32>
+let a1b = t1.toArray() :?> float32[]
+
+// Tensor
+let t2 = FurnaceImage.randn([3;3;3])
+
+// [,,]<float32>
+let a2 = t2.toArray() :?> float32[,,]
+
+
+ © Copyright 2025, Furnace Contributors.
+© Copyright 2025, Furnace Contributors.
+© Copyright 2025, Furnace Contributors.
+© Copyright 2025, Furnace Contributors.
+© Copyright 2025, Furnace Contributors.
+