MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / computeOutputShape

Method computeOutputShape

custom-layer/custom_layer.js:49–51  ·  view source on GitHub ↗

* This layer only works on 4D Tensors [batch, height, width, channels], * and produces output with twice as many channels. * * layer.computeOutputShapes must be overridden in the case that the output * shape is not the same as the input shape. * @param {*} inputShapes

(inputShape)

Source from the content-addressed store, hash-verified

47 * @param {*} inputShapes
48 */
49 computeOutputShape(inputShape) {
50 return [inputShape[0], inputShape[1], inputShape[2], 2 * inputShape[3]]
51 }
52
53 /**
54 * Centers the input and applies the following function to every element of

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected