Normalize
struct
defined in module
DataAugmentation
Normalize(means, stds)
Normalizes the last dimension of an
AbstractArrayItem{N}
.
Supports
apply!
.
Preprocessing a 3D image with 3 color channels.
using
DataAugmentation
,
Images
image
=
Image
(
rand
(
RGB
,
20
,
20
,
20
)
)
tfms
=
ImageToTensor
(
)
|>
Normalize
(
(
0.1
,
-0.2
,
-0.1
)
,
(
1
,
1
,
1.
)
)
apply
(
tfms
,
image
)
ArrayItem{4, Float32}() of size (20, 20, 20, 3)
There are
2
methods for DataAugmentation.Normalize
: