(
convInfo: backend_util.Conv3DInfo, poolType: 'max'|'avg',
computePositions = false, flattenPositions = false,
includeBatchIndex = false)
| 145 | includeBatchIndex: boolean; |
| 146 | |
| 147 | constructor( |
| 148 | convInfo: backend_util.Conv3DInfo, poolType: 'max'|'avg', |
| 149 | computePositions = false, flattenPositions = false, |
| 150 | includeBatchIndex = false) { |
| 151 | if (poolType === 'avg' && computePositions) { |
| 152 | throw new Error('Cannot compute positions for average pool.'); |
| 153 | } |
| 154 | |
| 155 | this.outputShape = convInfo.outShape; |
| 156 | this.dispatchLayout = flatDispatchLayout(this.outputShape); |
| 157 | this.dispatch = computeDispatch( |
| 158 | this.dispatchLayout, this.outputShape, this.workgroupSize); |
| 159 | |
| 160 | this.poolType = poolType; |
| 161 | this.computePositions = computePositions; |
| 162 | this.flattenPositions = flattenPositions; |
| 163 | this.includeBatchIndex = includeBatchIndex; |
| 164 | this.shaderKey = `pool3D_${poolType}_${computePositions}_${ |
| 165 | flattenPositions}_${includeBatchIndex}`; |
| 166 | } |
| 167 | |
| 168 | getUserCode(): string { |
| 169 | let updateSnippet: string; |
nothing calls this directly
no test coverage detected