![]() Tensor contraction over specified indices and outer product.Įinsum allows defining Tensors by defining their element-wise computation. , paddedShape / blockShape] + remainingShape Reshape permutedReshapedPadded to flatten blockShape into theīatch dimension, producing an output tensor of shape: ![]() Permute dimensions of reshapedPadded to produce permutedReshapedPadded , paddedShape / blockShape, blockShape] + remainingShape Reshape padded to reshapedPadded of shape: Zero-pad the start and end of dimensions of the inputĪccording to paddings to produce padded of shape paddedShape. (inputShape + padStart + padEnd) % blockShape = 0 paddings = specifies the amount to zero-padįrom input dimension i + 1, which corresponds to spatial dimension i. Must have shape, all values must be >=Ġ. Tf.depthToSpace(x, blockSize, dataFormat).print() The dataFormat attr specifies the layout of the input and output tensors The depth of the input tensor must be divisible by blockSize * blockSize The Y, X coordinates within each block of the output image are determinedīy the high order component of the input channel index The width the output tensor is inputWidth * blockSize, whereas the Into non-overlapping blocks of size blockSize x blockSize The attr blockSize indicates the input block size and how the data isĬhunks of data of size blockSize * blockSize from depth are rearranged This op outputs a copy of the input tensor where values from the depthĭimension are moved in spatial blocks to the height and width dimensions. Rearranges data from depth into blocks of spatial data. , x.shape * blockShape - crops - crops,x.shape. , x.shape]Ĭrop the start and end of dimensions of reshapedPermutedĪccording to crops to produce the output of shape: * blockShape - crops - crops. Reshape permuted to produce reshapedPermuted of shape * blockShape. Permute dimensions of reshapedto produce permuted of shape, blockShape. ![]() , blockShape, batch / prod(blockShape), x.shape. This operation is equivalent to the following steps: That cropStart + cropEnd <= blockShape * inputShape Must have shape, all values must be >= 0.Ĭrops = specifies the amount to crop from inputĭimension i + 1, which corresponds to spatial dimension i. N-D with x.shape = + spatialShape + remainingShape, where spatialShape has M dimensions. x ( tf.Tensor| TypedArray|Array) A tf.Tensor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |