Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 482 for ShapeN (0.13 sec)

  1. tensorflow/compiler/mlir/tensorflow/tests/constant-fold.mlir

      // CHECK-DAG: %[[SHAPE1:.*]] = "tf.Const"() <{value = dense<[1, 32, 32, 16]> : tensor<4xi64>}>
      // CHECK: %[[SHAPE2:.*]] = "tf.Shape"(%arg2) : (tensor<*xf32>) -> tensor<?xi64>
      %0:3 = "tf.ShapeN"(%arg0, %arg1, %arg2) : (tensor<f32>, tensor<1x32x32x16xf32>, tensor<*xf32>) -> (tensor<0xi64>, tensor<4xi64>, tensor<?xi64>)
    
      // CHECK: return %[[SHAPE0]], %[[SHAPE1]], %[[SHAPE2]]
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jan 31 23:22:24 UTC 2024
    - 36.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

      //
      // For example,
      //
      //   %shape  = tf.Shape(%arg)                   // %arg: tensor<?x2x3x1xf32>
      //   %height = tf.StridedSlice(%shape, 1, 2, 1)
      //
      // In this case %height can be replaced with a constant 2.
      //
      // Or,
      //
      //   %shape  = tf.Shape(%arg)                   // %arg: tensor<?x2x3x1xf32>
      //   %spatial_shape = tf.StridedSlice(%shape, 1, 3, 1)
      //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/mark_for_compilation_pass.cc

            //
            //   shape = RandomUniformInt();
            //   reshape = Reshape(input, shape)
            //
            // Both RandomUniformInt and Reshape are compilable by XLA so, absent
            // any other reason, we will try to put both shape and reshape in the
            // same cluster.  However, since XLA only supports statically shaped
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 12:19:41 UTC 2024
    - 85.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc

      {
        GraphDefBuilder shape2(GraphDefBuilder::kFailImmediately);
        Node* key_constant = KeyPlaceholder("F1", shape2.opts());
        Node* recv1 = RecvAtHost(
            ops::NodeOut(key_constant, 0), "F1", "F1", "O1", {DT_FLOAT, DT_FLOAT},
            shape2.opts().WithAttr(kXlaHasHostTransferAttrName, true));
        Node* e = Binary(ops::NodeOut(recv1, 0), ops::NodeOut(recv1, 1),
                         shape2.opts()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 113.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/shape_inference.cc

        // Merge node causes a loop so we remove NextIteration->Merge edge before
        // performing shape inference. But removing those edges also prevents us
        // from inferring output shape for Merge node (we need shapes for all its
        // inputs).
        // For loop invariant resource input's Merge node, we set output resource
        // shape as Enter node's resource shape.
        // TODO(b/129367850): clean this up.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 00:41:19 UTC 2024
    - 13K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/tests/shape-inference.mlir

    // RUN: tf-opt -split-input-file -verify-diagnostics --tf-shape-inference %s | FileCheck %s
    
    module attributes {tf.versions = {producer = 888 : i32}} {
    // CHECK-LABEL: testConv2dShapeValidPadding
    func.func @testConv2dShapeValidPadding(%arg0: tensor<1x112x80x128xf32>, %arg1: tensor<128x3x3x128xf32>, %arg2: tensor<128xf32>) -> tensor<1x?x?x128xf32> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

    // Extracts shape from XlaArgument as TensorShape. If shape is a xla::Shape,
    // that is converted to a TensorShape.
    absl::StatusOr<TensorShape> GetTensorShapeFromXlaArgument(
        const XlaArgument& arg) {
      if (absl::holds_alternative<xla::Shape>(arg.shape)) {
        TensorShape arg_shape;
        TF_RETURN_IF_ERROR(
            XLAShapeToTensorShape(std::get<xla::Shape>(arg.shape), &arg_shape));
        return arg_shape;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/tests/canonicalize.mlir

    ^bb0(%arg0: tensor<4x4x4xf32>) :
      %shape0 = arith.constant dense<[16, 4]> : tensor<2xi32>
      %shape1 = arith.constant dense<[64]> : tensor<1xi32>
      %0 = "tfl.reshape"(%arg0, %shape0) : (tensor<4x4x4xf32>, tensor<2xi32>) -> tensor<16x4xf32>
      %1 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32>
      %2 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

      }
    
      std::vector<std::optional<std::vector<int>>> shapes;
      TF_RETURN_IF_ERROR(::tensorflow::ParseNodeShapes(input_shapes, shapes));
    
      for (const auto& shape : shapes) {
        if (!shape) {
          return absl::AbortedError("Missing input argument shapes");
        }
        parsed_shapes.push_back(SmallVector<int64_t>(shape->begin(), shape->end()));
      }
      return parsed_shapes;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

    // 'shape' is the original shape with padding to match result shape.
    int64_t GetElementIndex(const std::vector<int64_t>& shape,
                            const std::vector<int64_t>& current_index) {
      int64_t ind = 0;
      int64_t mul = 1;
      for (int i = shape.size() - 1; i >= 0; --i) {
        ind += (current_index[i] % shape[i]) * mul;
        mul *= shape[i];
      }
      return ind;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
Back to top