@@ -201,7 +201,7 @@ Transforms are common image transforms. They can be chained together
201201using ``transforms.Compose ``
202202
203203``transforms.Compose ``
204- ~~~~~~~~~~~~~~~~~~~~~~
204+ ^^^^^^^^^^^^^^^^^^^^^^
205205
206206One can compose several transforms together. For example.
207207
@@ -216,10 +216,10 @@ One can compose several transforms together. For example.
216216 ])
217217
218218 Transforms on PIL.Image
219- -----------------------
219+ ~~~~~~~~~~~~~~~~~~~~~~~
220220
221221``Scale(size, interpolation=Image.BILINEAR) ``
222- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
223223
224224Rescales the input PIL.Image to the given 'size'. 'size' will be the
225225size of the smaller edge.
@@ -229,14 +229,14 @@ height / width, size) - size: size of the smaller edge - interpolation:
229229Default: PIL.Image.BILINEAR
230230
231231``CenterCrop(size) `` - center-crops the image to the given size
232- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
233233
234234Crops the given PIL.Image at the center to have a region of the given
235235size. size can be a tuple (target\_ height, target\_ width) or an integer,
236236in which case the target will be of a square shape (size, size)
237237
238238``RandomCrop(size, padding=0) ``
239- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240240
241241Crops the given PIL.Image at a random location to have a region of the
242242given size. size can be a tuple (target\_ height, target\_ width) or an
@@ -245,13 +245,13 @@ If ``padding`` is non-zero, then the image is first zero-padded on each
245245side with ``padding `` pixels.
246246
247247``RandomHorizontalFlip() ``
248- ~~~~~~~~~~~~~~~~~~~~~~~~~~
248+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
249249
250250Randomly horizontally flips the given PIL.Image with a probability of
2512510.5
252252
253253``RandomSizedCrop(size, interpolation=Image.BILINEAR) ``
254- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
254+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255255
256256Random crop the given PIL.Image to a random size of (0.08 to 1.0) of the
257257original size and and a random aspect ratio of 3/4 to 4/3 of the
@@ -261,23 +261,23 @@ This is popularly used to train the Inception networks - size: size of
261261the smaller edge - interpolation: Default: PIL.Image.BILINEAR
262262
263263``Pad(padding, fill=0) ``
264- ~~~~~~~~~~~~~~~~~~~~~~~~
264+ ^^^^^^^^^^^^^^^^^^^^^^^^
265265
266266Pads the given image on each side with ``padding `` number of pixels, and
267267the padding pixels are filled with pixel value ``fill ``. If a ``5x5 ``
268268image is padded with ``padding=1 `` then it becomes ``7x7 ``
269269
270270Transforms on torch.\* Tensor
271- ----------------------------
271+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
272272
273273``Normalize(mean, std) ``
274- ~~~~~~~~~~~~~~~~~~~~~~~~
274+ ^^^^^^^^^^^^^^^^^^^^^^^^
275275
276276Given mean: (R, G, B) and std: (R, G, B), will normalize each channel of
277277the torch.\* Tensor, i.e. channel = (channel - mean) / std
278278
279279Conversion Transforms
280- ---------------------
280+ ~~~~~~~~~~~~~~~~~~~~~
281281
282282- ``ToTensor() `` - Converts a PIL.Image (RGB) or numpy.ndarray (H x W x
283283 C) in the range [0, 255] to a torch.FloatTensor of shape (C x H x W)
@@ -287,10 +287,10 @@ Conversion Transforms
287287 shape H x W x C to a PIL.Image of range [0, 255]
288288
289289Generic Transofrms
290- ------------------
290+ ~~~~~~~~~~~~~~~~~~
291291
292292``Lambda(lambda) ``
293- ~~~~~~~~~~~~~~~~~~
293+ ^^^^^^^^^^^^^^^^^^
294294
295295Given a Python lambda, applies it to the input ``img `` and returns it.
296296For example:
0 commit comments