- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 100 for num_elements (0.39 sec)
-
tensorflow/compiler/jit/increase_dynamism_for_auto_jit_pass.cc
}; std::vector<int64_t> IntTensorAsVector(const Tensor& t) { DCHECK(t.dtype() == DT_INT32 || t.dtype() == DT_INT64); std::vector<int64_t> result; result.reserve(t.NumElements()); for (int i = 0; i < t.NumElements(); i++) { int64_t element = t.dtype() == DT_INT32 ? static_cast<int64_t>(t.flat<int32>()(i)) : t.flat<int64_t>()(i); result.push_back(element);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 12 06:33:33 UTC 2024 - 13.8K bytes - Viewed (0) -
pkg/api/testing/defaulting_test.go
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Kind: "PriorityLevelConfigurationList"}: {}, } f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1)) f.Funcs( func(s *runtime.RawExtension, c fuzz.Continue) {}, func(s *metav1.LabelSelector, c fuzz.Continue) { c.FuzzNoCustom(s)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 20.3K bytes - Viewed (0) -
tensorflow/compiler/jit/variable_info_util.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 08:47:20 UTC 2024 - 7K bytes - Viewed (0) -
tensorflow/cc/gradients/nn_grad_test.cc
// a reasonable amount apart T cur = 0; for (size_t i = 0; i < tensor->NumElements(); i++) { tensor_flat(i) = cur; cur += 5e-2; } // Fischer-Yates shuffle the array for (size_t i = tensor->NumElements() - 1; i >= 1; i--) { // j <- random integer 0 <= j <= i size_t j = random::New64() % (i + 1); // swap values at i, j
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 22 20:45:22 UTC 2022 - 15K bytes - Viewed (0) -
tensorflow/c/eager/gradients.cc
public: explicit TapeVSpace(AbstractContext* ctx) : ctx_(ctx) {} ~TapeVSpace() override {} // Returns the number of elements in the gradient tensor. int64_t NumElements(AbstractTensorHandle* tensor) const override; // Consumes references to the tensors in the gradient_tensors list and returns // a tensor with the result. AbstractTensorHandle* AggregateGradients(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 15 09:49:45 UTC 2024 - 19.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/tests/tf-ops.mlir
} // ----- func.func @testSetStaticDimensionBounds(%arg0: tensor<?x?xi32>, %arg1: tensor<4xi32>) -> tensor<?x?xi32> { // expected-error @below {{'tf.SetStaticDimensionBounds' op static shape must have num_elements == rank of input tensor}} %dyn_arg0 = "tf.SetStaticDimensionBounds" (%arg0, %arg1) :(tensor<?x?xi32>, tensor<4xi32>) -> tensor<?x?xi32> func.return %dyn_arg0 : tensor<?x?xi32> } // -----
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Oct 23 14:40:35 UTC 2023 - 236.4K bytes - Viewed (0) -
tensorflow/cc/saved_model/bundle_v2.cc
"SavedModel checkpoint does not contain object graph."); if (object_graph_tensor.dtype() != DT_STRING || object_graph_tensor.dims() != 0 || object_graph_tensor.NumElements() != 1) { return absl::Status( absl::StatusCode::kFailedPrecondition, "SavedModel checkpoint object graph was not the correct type."); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Dec 05 18:28:37 UTC 2023 - 9.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go
} } } func TestResetObjectMetaForStatus(t *testing.T) { meta := &ObjectMeta{} existingMeta := &ObjectMeta{} // fuzz the existingMeta to set every field, no nils f := fuzz.New().NilChance(0).NumElements(1, 1).MaxDepth(10) f.Fuzz(existingMeta) ResetObjectMetaForStatus(meta, existingMeta) // not all fields are stomped during the reset. These fields should not have been set. False
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 7.1K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/object.h
t.reset(imm_t->Resolve(&status)); if (!status.ok()) { return status; } } if (data.size() != t->NumElements()) { return tensorflow::errors::InvalidArgument(absl::StrCat( "Mismatched number of elements: \n", "Expected: ", data.size(), "\n", "Actual: ", t->NumElements(), "\n")); } memcpy(data.data(), t->Data(), t->ByteSize()); return ::tensorflow::OkStatus(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 11 08:05:36 UTC 2023 - 23.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc
mlir::MLIRContext context; RegisterDialects(context); mlir::Builder b(&context); // Create the sample tensor to convert. Tensor tensor(DT_STRING, TensorShape({1, 2, 2, 1})); EXPECT_EQ(4, tensor.NumElements()); auto Tt = tensor.flat<tstring>(); Tt.setValues({"one", "two", "three", "four"}); auto value_or_status = ConvertTensor(tensor, &b); ASSERT_TRUE(value_or_status.ok()); auto attr = value_or_status.value();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0)