Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for out_shape (0.28 sec)

  1. tensorflow/compiler/mlir/lite/utils/utils.h

      std::vector<int64_t> out_shape{output_type.getShape().vec()};
    
      // If the reshape changes the number of dimensions so it cannot be interpreted
      // as a transpose.
      if (in_shape.size() != out_shape.size()) {
        return false;
      }
    
      in_shape.erase(std::remove(in_shape.begin(), in_shape.end(), 1),
                     in_shape.end());
      out_shape.erase(std::remove(out_shape.begin(), out_shape.end(), 1),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

      ArrayRef<int64_t> shape = ranked_ty.getShape();
      SmallVector<int64_t, 4> out_shape;
      out_shape.reserve(rank - (keep_dims.getValue() ? 0 : num_reduce_dim));
      for (int64_t i = 0; i < rank; ++i) {
        if (!is_reduce_dim[i])
          out_shape.push_back(shape[i]);
        else if (keep_dims.getValue())
          out_shape.push_back(1);
      }
      return RankedTensorType::get(out_shape, element_ty);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

      }
      if (!OpTrait::util::getBroadcastedShape(lhs_shape, rhs_shape, *out_shape)) {
        return failure();
      }
    
      // Calculates dimension for the label L from L0,...,Ln in lhs.
      if (dnums.lhs_out.empty()) {
        lhs_shape.push_back(1);
        out_shape->push_back(1);
        dnums.lhs_out.emplace_back(lhs_shape.size() - 1, out_shape->size() - 1);
        ++num_lhs_reshape_segids;
      } else if (dnums.lhs_rhs_out.empty()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

      Attribute attr = operands.front();
      if (!attr) return {};
    
      auto int_attr = mlir::cast<DenseIntElementsAttr>(attr);
      SmallVector<int64_t, 6> out_shape;
      for (const auto val : int_attr.getValues<int32_t>()) {
        out_shape.push_back(val);
      }
    
      auto type = mlir::cast<ShapedType>(getResult().getType());
      auto etype = type.getElementType();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

        auto out_count = rewriter.create<MulOp>(
            loc, tensorflow::GetTypeFromTFTensorShape({}, out_size_element_ty),
            out_y, out_x);
    
        // Generate what the final output shape will look like.
        auto out_shape = rewriter.create<PackOp>(
            loc, tensorflow::GetTypeFromTFTensorShape({4}, out_size_element_ty),
            ValueRange({batch, out_y, out_x, channels}));
    
        // Compute the indices along the vertical dimension.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

      if (shape_x.size() == shape_y.size()) {
        llvm::SmallVector<int64_t, 4> out_shape(shape_x.size());
        for (int i = 0; i < shape_x.size(); i++) {
          auto x_val = shape_x[i];
          auto y_val = shape_y[i];
          out_shape[i] = std::max(x_val, y_val);
        }
        return tensorflow::GetTypeFromTFTensorShape(out_shape, element_type);
      }
    
      auto shape_large = shape_x.size() > shape_y.size() ? shape_x : shape_y;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tests/legalize-tf.mlir

      func.return %0 : tensor<?x?x?x?x?xf32>
      // CHECK-LABEL: conv3d_transpose
      // CHECK: %[[CST:.*]] = "tfl.no_value"() <{value}> : () -> none
      // CHECK: %[[OUT_SHAPE:.*]] = "tfl.cast"(%arg2) : (tensor<5xi64>) -> tensor<5xi32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 05 01:54:33 UTC 2024
    - 153.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfr/ir/tfr_ops.td

        }
      }];
    
      let hasCanonicalizer = 1;
    }
    
    def TFR_GetShapeOp : TFR_Op<"get_shape", [Pure]> {
      let description = [{
        The `get_shape` operation gets the shape of a tfr.tensor and returns
        !shape.shape type.
    
        Example:
    
        ```mlir
        %1 = "tfr.get_shape"(%0) : !tfr.tensor -> !shape.shape
        %1 = tfr.get_shape %0 -> !shape.shape
        ```
      }];
    
      let arguments = (ins TFR_TensorType:$arg);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 10:54:29 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/tests/tf_to_hlo_pipeline/sccp-post-shape-inference.mlir

        %2 = "tf.PartitionedCall"(%1) {config = "", config_proto = "", executor_type = "", f = @get_shape} : (tensor<?x?xf32>) -> (tensor<?xi64>)
    
        // CHECK: return %[[RESULT]]
        func.return %2 : tensor<?xi64>
      }
    
      // CHECK-LABEL: func @get_shape
      func.func @get_shape(%arg0 : tensor<*xi64>) -> tensor<?xi64> {
        %0 = "tf.Shape"(%arg0) : (tensor<*xi64>) -> tensor<?xi64>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jul 25 02:54:34 UTC 2023
    - 1020 bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantized_function_library_uniform_quantized.mlir

          %out_scale_filled = "tf.Fill" (%filter_shape, %out_scale) : (tensor<*xi32>, tensor<*xf32>) -> tensor<*xf32>
          %out_zp_filled = "tf.Fill" (%filter_shape, %out_zp) : (tensor<*xi32>, tensor<*xi32>) -> tensor<*xi32>
          %act = "tf.PartitionedCall"(%add, %accum_scale, %accum_zp, %out_scale_filled, %out_zp_filled, %out_scale, %out_zp) {
              config = "", config_proto = "", executor_type = "", f=@${act_func}
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Aug 29 01:13:58 UTC 2023
    - 19.3K bytes
    - Viewed (0)
Back to top