function countParams(x) {
	  var shape = x.shape;

	  if (shape.length > 0) {
	    return shape.reduce(function (a, b) {
	      return a * b;
	    });
	  } else {
	    // Scalar.
	    return 1;
	  }
	}
Get the number of elements in a Tensor.
@param x The Tensor.
@return Number of elements in `x`.