Tensor operations
Static member | Description |
|
|
|
|
|
|
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
|
|
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
|
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
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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 : int seq
-
The strides of the convolving kernel.
?padding : int
-
The implicit padding on corresponding sides of the input.
?paddings : int seq
-
The implicit paddings on corresponding sides of the input.
?dilation : int
-
The spacing between kernel elements.
?dilations : int seq
-
The spacings between kernel elements.
Returns: Tensor
|
|
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 : int seq
-
The strides of the convolving kernel.
?padding : int
-
The implicit padding on corresponding sides of the input.
?paddings : int seq
-
The implicit paddings on corresponding sides of the input.
?dilation : int
-
The spacing between kernel elements.
?dilations : int seq
-
The spacings between kernel elements.
Returns: Tensor
|
|
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
|
|
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 : int seq
-
The strides of the convolving kernel.
?paddings : int seq
-
The implicit paddings on corresponding sides of the input.
?dilations : int seq
-
The spacings between kernel elements.
?outputPaddings : int seq
-
The additional sizes added to one side of each dimension in the output shape.
Returns: Tensor
|
|
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 : int seq
-
The strides of the convolving kernel.
?paddings : int seq
-
The implicit paddings on corresponding sides of the input.
?dilations : int seq
-
The spacings between kernel elements.
?outputPaddings : int seq
-
The additional sizes added to one side of each dimension in the output shape.
Returns: Tensor
|
|
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\).
|
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
val x: obj
val y: obj
val xy: obj
Evaluates to
|
|
|
|
|
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\).
|
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
val x: obj
val y: obj
val xy: obj
Evaluates to
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
Full Usage:
FurnaceImage.empty (shape, ?device, ?dtype, ?backend)
Parameters:
int seq
-
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
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
Full Usage:
FurnaceImage.full (shape, value, ?device, ?dtype, ?backend)
Parameters:
int seq
-
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
|
|
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 : int seq
-
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
|
|
|
|
|
|
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.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
|
|
|
|
|
|
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
|
The function is passed the index of each element. The shapes of the three tensors must be identical.
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
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 : int seq
-
The sizes of the window to take a max over.
?strides : int seq
-
The strides of the window. Default value is kernelSize.
?paddings : int seq
-
The implicit zero paddings to be added on corresponding sides.
Returns: Tensor
|
|
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 : int seq
-
The sizes of the window to take a max over.
?strides : int seq
-
The strides of the window. Default value is kernelSize.
?paddings : int seq
-
The implicit zero paddings to be added on corresponding sides.
Returns: Tensor * Tensor
|
|
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 : int seq
-
The sizes of the window to take a max over.
?strides : int seq
-
The strides of the window. Default value is kernelSizes.
?paddings : int seq
-
The implicit zero paddings to be added on corresponding sides.
Returns: Tensor
|
|
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 : int seq
-
The sizes of the window to take a max over.
?strides : int seq
-
The strides of the window. Default value is kernelSize.
?paddings : int seq
-
The implicit zero paddings to be added on corresponding sides.
Returns: Tensor * Tensor
|
|
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 : int seq
-
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 : int seq
-
The sizes of the window to take a max over.
?strides : int seq
-
The strides of the window. Default value is kernelSizes.
?paddings : int seq
-
The implicit zero paddings to be added on corresponding sides.
?outputSize : int seq
-
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 : int seq
-
The sizes of the window to take a max over.
?strides : int seq
-
The strides of the window. Default value is kernelSizes.
?paddings : int seq
-
The implicit zero paddings to be added on corresponding sides.
?outputSize : int seq
-
The targeted output size.
Returns: Tensor
|
|
|
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).
|
|
|
|
|
|
|
|
|
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
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
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 ()
|
|
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
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Full Usage:
FurnaceImage.ones (shape, ?device, ?dtype, ?backend)
Parameters:
int seq
-
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
|
|
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 : int seq
-
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
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
Full Usage:
FurnaceImage.rand (shape, ?device, ?dtype, ?backend)
Parameters:
int seq
-
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
|
|
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 : int seq
-
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
|
|
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
|
|
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 : int seq
-
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
|
|
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 : int seq
-
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
|
|
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
|
|
Full Usage:
FurnaceImage.randn (shape, ?device, ?dtype, ?backend)
Parameters:
int seq
-
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
|
|
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 : int seq
-
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
FurnaceImage.save (value, fileName)
Parameters:
obj
fileName : string
|
|
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
|
|
Full Usage:
FurnaceImage.seed ?seed
Parameters:
int
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 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).
|
|
|
|
|
|
|
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
|
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
val t1: obj
val t2: obj
|
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
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
Full Usage:
FurnaceImage.version
Returns: string
|
|
|
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]\]
|
|
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
|
|
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
|
|
Full Usage:
FurnaceImage.zeros (shape, ?device, ?dtype, ?backend)
Parameters:
int seq
-
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
|
|
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 : int seq
-
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
|
|
© Copyright 2025, Furnace Contributors.