Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for reduce_sum (0.17 sec)

  1. tensorflow/cc/gradients/array_grad.cc

      // all the gradients from the shape it fills.
      // We use ReduceSum to implement this, which needs an argument providing
      // the indices of all the dimensions of the incoming gradient.
      // grad(x) = reduce_sum(grad(y), [0..rank(grad(y))])
      auto all_dims = Range(scope, Const(scope, 0), Rank(scope, grad_inputs[0]),
                            Const(scope, 1));
      grad_outputs->push_back(ReduceSum(scope, grad_inputs[0], all_dims));
      return scope.status();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 10 23:33:32 UTC 2023
    - 31.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

          mlir::dyn_cast_or_null<RankedTensorType>(op.getOperand(0).getType());
      if (!lhs) {
        return failure();
      }
      // unary einsum op is only supported to the case where the operation can be
      // replaced using reduce_sum and/or transpose
      if (const auto dnums_or =
              GetEinsumDimensionNumbersUnary(op.getEquation(), lhs)) {
        return rewriteToReduceSumAndTranspose(op, dnums_or.value(), rewriter);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc

      auto iota_shape = iota_type.getShape();
      auto reduce_dim = (*dimensions.value_begin<APInt>()).getSExtValue();
      if (reduce_dim < 0) reduce_dim += iota_type.getRank();
    
      auto index =
          std::optional<SmallVector<int64_t>>(std::in_place, iota_type.getRank());
      while (index.has_value()) {
        StridedArrayView<DenseIntElementsAttr> array_view(
            iota_const_attr, iota_shape, *index, reduce_dim);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
Back to top