function computeFans(shape, dataFormat) {
	  if (dataFormat === void 0) {
	    dataFormat = 'channelsLast';
	  }

	  var fanIn;
	  var fanOut;
	  checkDataFormat(dataFormat);

	  if (shape.length === 2) {
	    fanIn = shape[0];
	    fanOut = shape[1];
	  } else if ([3, 4, 5].indexOf(shape.length) !== -1) {
	    if (dataFormat === 'channelsFirst') {
	      var receptiveFieldSize = arrayProd(shape, 2);
	      fanIn = shape[1] * receptiveFieldSize;
	      fanOut = shape[0] * receptiveFieldSize;
	    } else if (dataFormat === 'channelsLast') {
	      var _receptiveFieldSize = arrayProd(shape, 0, shape.length - 2);

	      fanIn = shape[shape.length - 2] * _receptiveFieldSize;
	      fanOut = shape[shape.length - 1] * _receptiveFieldSize;
	    }
	  } else {
	    var shapeProd = arrayProd(shape);
	    fanIn = Math.sqrt(shapeProd);
	    fanOut = Math.sqrt(shapeProd);
	  }

	  return [fanIn, fanOut];
	}
Computes the number of input and output units for a weight shape.
@param shape Shape of weight.
@param dataFormat data format to use for convolution kernels.
  Note that all kernels in Keras are standardized on the
  CHANNEL_LAST ordering (even when inputs are set to CHANNEL_FIRST).
@return An length-2 array: fanIn, fanOut.