- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for out_shape (0.26 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
tensorflow/compiler/mlir/lite/tests/legalize-tf.mlir
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 05 01:54:33 UTC 2024 - 153.4K 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/quantization/tensorflow/passes/preprocess_op.cc
return failure(); } // Get new shape. llvm::ArrayRef<int64_t> cur_shape = attr.getType().getShape(); int cur_rank = cur_shape.size(); if (cur_rank != 4 || cur_shape[2] == 1) return failure(); TensorType new_shape = RankedTensorType::get( {cur_shape[0], cur_shape[1], 1, cur_shape[2] * cur_shape[3]}, attr.getElementType()); // Inserts a reshape op.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/set_tpu_infeed_layout.cc
// TODO(kramm): Move this into a separate pass. See b/184944903 xla::Shape old_shape = xla::TypeToShape(t); XLA_Shape old_shape_c = {}; XLA_Shape new_shape_c = {}; TfTpu_ExecutorApiFn *executor = stream_executor::tpu::ExecutorApiFn(); if (!stream_executor::tpu::IsInitialized(executor)) { return failure(); } ApiConverter::ToC(old_shape, &old_shape_c);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0)