- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 100 for num_elements (0.19 sec)
-
tensorflow/c/eager/immediate_execution_tensor_handle.h
public: // Returns number of dimensions. virtual Status NumDims(int* num_dims) const = 0; // Returns number of elements across all dimensions. virtual Status NumElements(int64_t* num_elements) const = 0; // Returns size of specified dimension // // -1 indicates an unknown axis length; this is unreachable for most standard // ImmediateExecutionTensorHandles, but comes up for example when computing
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 10 21:56:24 UTC 2023 - 4.3K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test_util.cc
return th; } TFE_TensorHandle* TestMatrixTensorHandle100x100(TFE_Context* ctx) { constexpr int64_t dims[] = {100, 100}; constexpr int num_elements = dims[0] * dims[1]; float data[num_elements]; for (int i = 0; i < num_elements; ++i) { data[i] = 1.0f; } TF_Status* status = TF_NewStatus(); TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, &dims[0],
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc
// This op is guaranteed to be a constant as ODS checks IsConstTensor. // Check if the number of elements meets the requirement. int64_t num_elements = mlir::cast<ShapedType>(call_op.getOperand(0).getType()) .getNumElements(); if (num_elements < quant_options_.min_num_elements_for_weights()) { return absl::InternalError( "The params of Gather have fewer number of elements than "
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 10 04:07:09 UTC 2024 - 16.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/api/v2/legalize_tf_test.cc
// zero reserved elements %num_elements = "tf.Const"() <{value = dense<0> : tensor<i32>}> {device = "/job:localhost/replica:0/task:0/device:CPU:0"} : () -> tensor<i32> %list = "tf.TensorListReserve"(%elem_shape, %num_elements) : (tensor<i32>, tensor<i32>) -> tensor<!tf_type.variant<tensor<64x1xbf16>>>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 13 23:59:33 UTC 2024 - 16.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/ir/tfl_ops.cc
SmallVector<ValueType, 16> new_values; new_values.reserve(num_elements); ValueType new_value = start; for (int i = 0; i < num_elements; ++i) { new_values.push_back(new_value); new_value = new_value + delta; } // Result is always a 1-D tensor. auto new_result_type = tensorflow::GetTypeFromTFTensorShape({num_elements}, result_elem_type);
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/transforms/lower_static_tensor_list.cc
Type shape_dtype = getElementTypeOrSelf(op.getElementShape().getType()); Value num_elements = operands[1]; IntegerAttr attr; if (matchPattern(num_elements, m_Constant(&attr))) { return CreateI32SplatConst(op.getLoc(), rewriter, {1}, attr.getInt()); } if (auto const_op = num_elements.getDefiningOp<TF::ConstOp>()) { return CreateI32SplatConst(op->getLoc(), rewriter, {1},
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 70.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/tests/mlrt/while_to_map_fn.mlir
// CHECK-NEXT: TensorListStack %2 = "tf.TensorListStack"(%1#2, %cst_0) {device = "/job:localhost/replica:0/task:0/device:CPU:0", num_elements = 2 : i64} : (tensor<!tf_type.variant<tensor<*xf32>>>, tensor<1xi32>) -> tensor<2x8xf32> %3 = "tf.TensorListStack"(%1#3, %cst_0) {device = "/job:localhost/replica:0/task:0/device:CPU:0", num_elements = 2 : i64} : (tensor<!tf_type.variant<tensor<*xf32>>>, tensor<1xi32>) -> tensor<2x8xf32>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 23 06:40:22 UTC 2024 - 68.6K bytes - Viewed (0) -
tensorflow/cc/saved_model/loader.cc
const PartialTensorShape node_shape(node_value.tensor().tensor_shape()); if (node_shape.num_elements() < 0) { return absl::FailedPreconditionError(absl::StrCat( "Saved model contains node \"", node.name(), "\" (op \"", node.op(), "\") which initializes from a tensor with ", node_shape.num_elements(), " elements")); } } } else if (node.op() == "Const") {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 02 04:36:00 UTC 2024 - 23K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc
SmallVector<ValueType, 16> new_values; new_values.reserve(num_elements); ValueType new_value = start; for (int i = 0; i < num_elements; ++i) { new_values.push_back(new_value); new_value = new_value + delta; } // Result is always a 1-D tensor. auto new_result_type = tensorflow::GetTypeFromTFTensorShape({num_elements}, result_elem_type); return DenseElementsAttr::get(new_result_type, new_values);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0) -
tensorflow/c/eager/c_api.cc
if (h == nullptr) { status->status = tensorflow::errors::InvalidArgument("Invalid handle"); return -1; } int64_t num_elements = -1; status->status = tensorflow::unwrap(h)->NumElements(&num_elements); return num_elements; } int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, int dim_index, TF_Status* status) { if (h == nullptr) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 08:11:23 UTC 2024 - 44K bytes - Viewed (0)