MCPcopy Index your code
hub / github.com/tensorflow/tfjs / preprocessConv3DInput

Function preprocessConv3DInput

tfjs-layers/src/layers/convolutional.ts:58–68  ·  view source on GitHub ↗
(
    x: Tensor, dataFormat: DataFormat)

Source from the content-addressed store, hash-verified

56 * @param dataFormat
57 */
58export function preprocessConv3DInput(
59 x: Tensor, dataFormat: DataFormat): Tensor {
60 return tidy(() => {
61 checkDataFormat(dataFormat);
62 if (dataFormat === 'channelsFirst') {
63 return tfc.transpose(x, [0, 2, 3, 4, 1]); // NCDHW -> NDHWC.
64 } else {
65 return x;
66 }
67 });
68}
69
70/**
71 * 1D-convolution with bias added.

Callers 2

pool3dFunction · 0.90
conv3dWithBiasFunction · 0.85

Calls 3

tidyFunction · 0.90
checkDataFormatFunction · 0.90
transposeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…