Type extension | Description |
Extended Type:
|
|
Full Usage:
dsharp.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:
dsharp.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 2021, DiffSharp Contributors.