- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 36 for new_shape (0.48 sec)
-
tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc
llvm::ArrayRef<int32_t> perm) { llvm::SmallVector<int64_t> new_shape(shape.size()); for (const auto &perm_element : enumerate(perm)) { new_shape[perm_element.index()] = shape[perm_element.value()]; } return new_shape; } // Determine if op commutes with transposes. Requires a strict // definition of Elementwise, all i/o shapes and types must be same-rank
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize.cc
} SmallVector<int> new_shape( reshape_op.getType().getShape().drop_front().begin(), reshape_op.getType().getShape().drop_front().end()); new_shape.push_back(reshape_op.getType().getDimSize(0)); auto shape_constant = rewriter.create<ConstOp>( op.getLoc(), GetI32ElementsAttr(new_shape, &rewriter)); auto new_reshape = rewriter.create<ReshapeOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 43.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc
if (!type.hasRank()) return type; auto shape = type.getShape(); SmallVector<int64_t, 4> new_shape(shape.size()); for (int i = 0; i < permutation.size(); ++i) { int64_t index = permutation[i]; assert(index < shape.size()); new_shape[index] = shape[i]; } return type.clone(new_shape); } // Move Transpose operations that permute `op` operands after the `op`.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 19.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc
// [H, W, ..., filter_in_depth, G, out_depth / G]. auto new_shape = llvm::to_vector<6>(filter_shape); new_shape.back() = feature_group_count; new_shape.push_back(filter_shape.back() / feature_group_count); Type filter_element_ty = filter_ty.getElementType(); auto ty = tensorflow::GetTypeFromTFTensorShape(new_shape, filter_element_ty);
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/ir/tfl_ops.cc
// left if needed. inline std::vector<int64_t> GetPaddedShape(ArrayRef<int64_t> old_shape, int new_dims) { std::vector<int64_t> new_shape(new_dims, 1); std::copy_backward(old_shape.begin(), old_shape.end(), new_shape.end()); return new_shape; } // Helper method that given and 'current_index' representing // index in broadcasted tensor, get the index in the flat original tensor.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 169.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_import.cc
// required by the new converter, from the reshape op's option. auto new_shape = op.builtin_options.AsReshapeOptions()->new_shape; auto shape_type = tensorflow::GetTypeFromTFTensorShape( {static_cast<int64_t>(new_shape.size())}, builder.getIntegerType(32)); mlir::SmallVector<mlir::Attribute, 4> shape; for (auto s : new_shape) { shape.push_back(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc
auto new_shape_const_attr = DenseElementsAttr::get(shape_spec_type, new_shape.getShape()); rewriter.setInsertionPointAfter(weight_op); auto new_shape_const = rewriter.create<TF::ConstOp>( weight_op->getLoc(), shape_spec_type, new_shape_const_attr); auto reshape_op = rewriter.create<TF::ReshapeOp>( weight_op->getLoc(), new_shape, weight_op->getResult(0), new_shape_const);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 54.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc
/*shape=*/new_shape, /*type=*/new_filter_quantized_type); } else if (element_type.isa<UniformQuantizedType>()) { auto per_tensor_type = element_type.cast<UniformQuantizedType>(); new_filter_result_type = RankedTensorType::getChecked(location, /*shape=*/new_shape,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 09:00:19 UTC 2024 - 99.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc
rewriter.replaceOp(op, {input}); return success(); } RankedTensorType shape_type = tensorflow::GetTypeFromTFTensorShape({-1}, rewriter.getIntegerType(32)); auto new_shape = rewriter.create<TF::ShapeOp>(loc, shape_type, input); SmallVector<int64_t, 8> output_shape(/*Size=*/1, op.getNumElements()); for (const auto &dim : dense_elem_attr.getValues<APInt>())
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 70.7K bytes - Viewed (0)