Shortcuts

pl_bolts.models.self_supervised.simclr.transforms module

class pl_bolts.models.self_supervised.simclr.transforms.GaussianBlur(kernel_size, p=0.5, min=0.1, max=2.0)[source]

Bases: object

__call__(sample)[source]

Call self as a function.

class pl_bolts.models.self_supervised.simclr.transforms.SimCLREvalDataTransform(input_height=224, gaussian_blur=True, jitter_strength=1.0, normalize=None)[source]

Bases: pl_bolts.models.self_supervised.simclr.transforms.SimCLRTrainDataTransform

Transforms for SimCLR

Transform:

Resize(input_height + 10, interpolation=3)
transforms.CenterCrop(input_height),
transforms.ToTensor()

Example:

from pl_bolts.models.self_supervised.simclr.transforms import SimCLREvalDataTransform

transform = SimCLREvalDataTransform(input_height=32)
x = sample()
(xi, xj) = transform(x)
class pl_bolts.models.self_supervised.simclr.transforms.SimCLRFinetuneTransform(input_height=224, jitter_strength=1.0, normalize=None, eval_transform=False)[source]

Bases: object

__call__(sample)[source]

Call self as a function.

class pl_bolts.models.self_supervised.simclr.transforms.SimCLRTrainDataTransform(input_height=224, gaussian_blur=True, jitter_strength=1.0, normalize=None)[source]

Bases: object

Transforms for SimCLR

Transform:

RandomResizedCrop(size=self.input_height)
RandomHorizontalFlip()
RandomApply([color_jitter], p=0.8)
RandomGrayscale(p=0.2)
GaussianBlur(kernel_size=int(0.1 * self.input_height))
transforms.ToTensor()

Example:

from pl_bolts.models.self_supervised.simclr.transforms import SimCLRTrainDataTransform

transform = SimCLRTrainDataTransform(input_height=32)
x = sample()
(xi, xj) = transform(x)
__call__(sample)[source]

Call self as a function.

Read the Docs v: 0.3.0
Versions
latest
stable
0.3.0
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.1
0.1.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.