https://gitcode.net/megvii/megengine/-/commit/2f06d580b9d69415df34d114bbf67a61e006192cfeat(xla): add topk and sort for xla2023-07-31T10:04:07+08:00Megvii Engine Teammegengine@megvii.com
GitOrigin-RevId: 0e881f30429a8d849ad9cdd0e0f47c3e0921ff97https://gitcode.net/megvii/megengine/-/commit/c2b9d5428456601e4ef10d3372fdbfcc94b142b7fix(lite): fix the possibility of obtaining incorrect host device type when c...2023-08-07T16:04:02+08:00Megvii Engine Teammegengine@megvii.com
GitOrigin-RevId: db0c8c071239bc7f3d7afaf97203426550d06402https://gitcode.net/megvii/megengine/-/commit/de084f92ba7780f63cf86174b05f56f34fd46181fix(src/atlas): remove the limitation that the input of the om model must be ...2023-08-07T20:03:53+08:00Megvii Engine Teammegengine@megvii.com
GitOrigin-RevId: ab3fce058e8ce1fa47e05142170b06a33bdcbf95https://gitcode.net/megvii/megengine/-/commit/abb7f6eff9503bcb407099430e52b8a1668c0a2efix(src/atlas): support static input batch and dynamic output batch2023-08-07T20:04:00+08:00Megvii Engine Teammegengine@megvii.com
GitOrigin-RevId: 78df430e68e417c64e1f5aae89bd39b1fb91cb60https://gitcode.net/megvii/megengine/-/commit/35167e53665d5752350b4978ce3481b9f5b9e30afeat(imperative): add augs including emboss, sharpen, linearcontrast2023-08-10T11:06:05+08:00Megvii Engine Teammegengine@megvii.com
GitOrigin-RevId: c050784b9d5be33932c483ea954418b2e4ba3310https://gitcode.net/megvii/megengine/-/commit/801265e9c98a7ae6636ae345f4dfd8f6bca0824bfix(imperative): fix linearconst test2023-08-10T11:06:12+08:00Megvii Engine Teammegengine@megvii.com
GitOrigin-RevId: 52d64c35190de65270aadffef6c449945ed16804https://gitcode.net/megvii/megengine/-/commit/66b79160d35b2710c00befede0c3fd729109e474fix(src/gopt): fix padding channel pass bug that hasn't insert a subtensor be...2023-08-11T14:04:12+08:00Megvii Engine Teammegengine@megvii.com
GitOrigin-RevId: 01bd8c70e96f72e6c5089d73ec7da607462837db
@@ -54,12 +72,11 @@ class AdditiveLaplaceNoise(AdditiveElemwise):
r"""Add random laplace noise to the input data.
Laplace noise is generated with given mean and std, sampled from Laplace distribution
ref to this page to learn more: https://en.wikipedia.org/wiki/Laplace_distribution
Args:
mean: laplace mean used to generate noise.
std: laplace standard deviation used to generate noise.
per_channel: Whether to use (imagewise) the same sample(s) for all channels (False) or to sample value(s) for each channel (True). Setting this to True will therefore lead to different transformations per image and channel, otherwise only per image.
per_channel: whether to use (imagewise) the same sample(s) for all channels (False) or to sample value(s) for each channel (True). Setting this to True will therefore lead to different transformations per image and channel, otherwise only per image.
seed: random number seed of generator
"""
...
...
@@ -94,7 +111,7 @@ class AdditivePoissonNoise(AdditiveElemwise):
Args:
lam: lam parameter of poisson distribution used to generate noise.
per_channel: Whether to use (imagewise) the same sample(s) for all channels (False) or to sample value(s) for each channel (True). Setting this to True will therefore lead to different transformations per image and channel, otherwise only per image.
per_channel: whether to use (imagewise) the same sample(s) for all channels (False) or to sample value(s) for each channel (True). Setting this to True will therefore lead to different transformations per image and channel, otherwise only per image.
seed: random number seed of generator
"""
...
...
@@ -125,9 +142,9 @@ class AdditiveGaussianNoise(AdditiveElemwise):
Gaussian noise is generated with given mean and std.
Args:
mean: Gaussian mean used to generate noise.
std: Gaussian standard deviation used to generate noise.
per_channel: Whether to use (imagewise) the same sample(s) for all channels (False) or to sample value(s) for each channel (True). Setting this to True will therefore lead to different transformations per image and channel, otherwise only per image.
mean: gaussian mean used to generate noise.
std: gaussian standard deviation used to generate noise.
per_channel: whether to use (imagewise) the same sample(s) for all channels (False) or to sample value(s) for each channel (True). Setting this to True will therefore lead to different transformations per image and channel, otherwise only per image.
seed: random number seed of generator
"""
...
...
@@ -152,3 +169,344 @@ class AdditiveGaussianNoise(AdditiveElemwise):
r"""overlay emboss effect and alpha-blend the result with the original input
The embossed version pronounces highlights and shadows, enhances the high-frequency information of the image, and retains the low-frequency information of the image
Args:
alpha: adjust visibility of embossed images. number or tuple of number, At ``0.0``, only the original image is visible, at ``1.0`` only its embossed version is visible. If a tuple ``(a, b)``, a random value will be sampled from the interval ``[a, b)``.
strength: emboss strength.Sane values are somewhere in the interval ``[0.0, 2.0)`` with ``1.0``, number or tuple of number, If a tuple ``(a, b)``, a random value will be sampled from the interval ``[a, b)``.
r"""Sharpen images and alpha-blend the result with the original input.
Args:
alpha: adjust visibility of sharpened images. number or tuple of number, At ``0.0``, only the original image is visible, at ``1.0`` only its embossed version is visible. If a tuple ``(a, b)``, a random value will be sampled from the interval ``[a, b)``.
lightness: controls the brightness of sharpened images. Sane values are somewhere in the interval ``[0.5, 2.0)`` with ``1.0``, number or tuple of number, If a tuple ``(a, b)``, a random value will be sampled from the interval ``[a, b)``.
r"""Adjust contrast by scaling each pixel to ``127 + alpha*(v-127)``.
Args:
alpha: number or tuple of number. If a tuple ``(a, b)``, a random value will be sampled from the interval ``[a, b)``.
per_channel:whether to use (imagewise) the same sample(s) for all channels (False) or to sample value(s) for each channel (True). Setting this to True will therefore lead to different transformations per image and channel, otherwise only per image.