DeepLearning/Tensor/RandomCrop - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Operations on Tensors : DeepLearning/Tensor/RandomCrop

DeepLearning/Tensor/RandomCrop

randomly crop 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 TensorName: Const:0Shape: [4, 3]Data Type: float[8]

(1)

t1RandomCropC,3,2

t1DeepLearning TensorName: random_crop:0Shape: [3, 2]Data Type: float[8]

(2)

Shapet1

3,2

(3)

Shuffle a Tensor along its first dimension.

t2RandomShuffleC

t2DeepLearning TensorName: RandomShuffle:0Shape: [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