- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 40 for num_elements (0.28 sec)
-
tensorflow/cc/framework/ops.h
typedef typename RealType<T>::type RealT; Tensor t(DataTypeToEnum<RealT>::v(), shape); if (t.NumElements() != static_cast<int64_t>(v.size())) { status = absl::InvalidArgumentError(absl::StrCat( "Cannot construct a tensor with ", t.NumElements(), " from an initializer list with ", v.size(), " elements")); return; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 13 05:57:22 UTC 2024 - 10.5K bytes - Viewed (0) -
tensorflow/compiler/jit/node_matchers.cc
if (actual.NumElements() != expected.NumElements()) { if (listener->IsInterested()) { *listener << "\nwas looking for tensor with " << expected.NumElements() << " elements, found tensor with " << actual.NumElements() << " elements"; return false; } } for (int64_t i = 0, e = actual.NumElements(); i < e; i++) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Jun 03 16:15:20 UTC 2022 - 16.8K bytes - Viewed (0) -
tensorflow/compiler/jit/pjrt_device_context.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 13 08:49:31 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/cc/framework/gradients_test.cc
ClientSession session(scope_test_); std::vector<Tensor> grad_result; TF_EXPECT_OK(session.Run({{x, {3.0f}}}, grad_outputs, &grad_result)); EXPECT_EQ(grad_result.size(), 1); EXPECT_EQ(grad_result[0].NumElements(), 1); EXPECT_EQ(grad_result[0].flat<float>()(0), 17502.0f); } TEST_F(GradientsTest, MultiOutputNodeDependentOutputs) { auto x = Placeholder(scope_test_, DT_FLOAT); auto y0 = Square(scope_test_, x);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 15 15:13:38 UTC 2023 - 25K bytes - Viewed (0) -
src/encoding/asn1/asn1.go
if invalidLength(offset, t.length, len(bytes)) { err = SyntaxError{"truncated sequence"} return } offset += t.length numElements++ } ret = reflect.MakeSlice(sliceType, numElements, numElements) params := fieldParameters{} offset := 0 for i := 0; i < numElements; i++ { offset, err = parseField(ret.Index(i), bytes, offset, params) if err != nil { return } } return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 31.8K bytes - Viewed (0) -
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/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/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)