- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 128 for get_shape (0.15 sec)
-
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) -
tensorflow/compiler/mlir/tfr/tests/ops.mlir
%0 = tfr.call @Huu(%arg0) : (tensor<?xf32>) -> !tfr.tensor<K> func.return %0 : !tfr.tensor<K> } // ----- // CHECK-LABEL: get_shape func.func @get_shape(%arg0: !tfr.tensor) -> (!shape.shape, !shape.shape) { %0 = tfr.get_shape %arg0 -> !shape.shape %1 = "tfr.get_shape"(%arg0) : (!tfr.tensor) -> !shape.shape func.return %0, %1 : !shape.shape, !shape.shape } // ----- // CHECK-LABEL: get_real_shape
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Jan 14 22:15:06 UTC 2023 - 13.1K bytes - Viewed (0) -
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) -
tensorflow/compiler/mlir/tensorflow/g3doc/space_to_depth.md
kernel_initializer=tf.variance_scaling_initializer(), data_format=data_format) # Use the image size without space-to-depth transform as the input of conv0. batch_size, h, w, channel = inputs.get_shape().as_list() conv0.build([ batch_size, h * space_to_depth_block_size, w * space_to_depth_block_size, channel // (space_to_depth_block_size**2) ]) kernel = conv0.weights[0]
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Oct 24 02:51:43 UTC 2020 - 8.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/tests/canonicalize.mlir
// Tests for ops with canonicalization patterns. // CHECK-LABEL: get_real_shape func.func @get_real_shape(%arg0: tensor<1x2xf32>) -> tensor<2xindex> { %0 = "tfr.cast"(%arg0) : (tensor<1x2xf32>) -> !tfr.tensor %1 = tfr.get_shape %0 -> !shape.shape %2 = shape.to_extent_tensor %1 : !shape.shape -> tensor<2xindex> func.return %2 : tensor<2xindex> // CHECK-NEXT: %[[e:.*]] = shape.const_shape [1, 2] : tensor<2xindex>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Oct 30 06:52:55 UTC 2023 - 11.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/python/tfr_gen_test.py
mlir_code_exp = r""" CHECK-LABEL: tfr.func @tf__test_identity_op(%x: !tfr.tensor) -> (!tfr.tensor) { CHECK-NEXT: %[[shape:.*]] = tfr.get_shape %x -> !shape.shape CHECK-NEXT: %[[shape_1:.*]] = tfr.get_shape %x -> !shape.shape CHECK-NEXT: %[[len:.*]] = shape.rank %[[shape_1]] : !shape.shape -> !shape.size CHECK-NEXT: %[[index:.*]] = shape.size_to_index %[[len]] : !shape.size
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 13 16:33:28 UTC 2021 - 28.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/python/tfr_gen.py
get_state, _ = self.visit(node.args[3]) nouts = int(node.args[6].value) out_symbols = [] # The out symbols are just a Tuple of names for out in node.args[5].elts[:nouts]: val, ty = self.symbol_table.lookup(out.value) out_symbols.append(out.value) return self._visit_if_stmt(cond, body, orelse, get_state, out_symbols,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 27 15:27:03 UTC 2022 - 55.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/utils.h
} int rank = shaped_type.getRank(); if (rank < 2) { return nullptr; } SmallVector<int64_t> new_shape(shaped_type.getShape().begin(), shaped_type.getShape().end()); std::swap(new_shape[rank - 1], new_shape[rank - 2]); return shaped_type.clone(new_shape); } // Returns a ShapedType for a permutation and the shape of input after
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tf_xla_op_to_tf_op.cc
mlir::cast<ShapedType>(slice_sizes.getType()).getShape(), builder.getI64Type()), slice_sizes)); // Collapses dimensions by reshaping. SmallVector<int64_t> new_shape(operand_rank - collapsed_dims.size()); for (int64_t i = 0, j = 0; i < operand_rank; i++) { if (!collapsed_dims.contains(i)) { new_shape[j++] = operand_shape[i]; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 13.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize.cc
// only when height = width. if (params_type.getShape().size() != 4 || indices_type.getShape().size() != 2) return failure(); if (params_type.getShape()[1] != 1) return failure(); if (params_type.getShape()[0] != params_type.getShape()[2]) return failure(); if (result_type.getShape()[0] != params_type.getShape()[0] * 2) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 102.3K bytes - Viewed (0)