RandomCrop - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


DeepLearning/Tensor/RandomCrop

randomly shuffle a Tensor to specified shape

DeepLearning/Tensor/RandomShuffle

randomly shuffle a Tensor along its first dimension

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

RandomCrop(t,shape,opts)

RandomShuffle(t,opts)

Parameters

t

-

Tensor

shape

-

list of integers

opts

-

zero or more options as specified below

Options

• 

name=string

The value of option name specifies an optional name for this Tensor, to be displayed in output and when visualizing the dataflow graph.

• 

seed=integer[8]

The value of option seed specifies an initial seed for the random number generator. It is equivalent to invoking SetRandomSeed(seed). For more information see SetRandomSeed.

Description

• 

The RandomCrop(t,shape,opts) command constructs a Tensor with shape shape by randomly slicing data from t with uniform probability.

• 

The RandomShuffle(t,opts) command randomly shuffles a Tensor along its first dimension.

Examples

Crop a random 3x2 slice from a 4x3 Tensor.

withDeepLearning:

CConstant3.5,7.9,0.5,1|3.8,4.2,9.5,3|4.,7.2,8.2,2

CDeepLearning TensorShape: [4, 3]Data Type: float[8]

(1)

t1RandomCropC,3,2

t1DeepLearning TensorShape: [3, 2]Data Type: float[8]

(2)

Shapet1

3,2

(3)

Shuffle a Tensor along its first dimension.

t2RandomShuffleC

t2DeepLearning TensorShape: [4, 3]Data Type: float[8]

(4)

Compatibility

• 

The DeepLearning/Tensor/RandomCrop and DeepLearning/Tensor/RandomShuffle commands were introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

DeepLearning Overview

DeepLearning,RandomTensor

DeepLearning,SetRandomSeed

Tensor