- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 37 for num_elements (0.3 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/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/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) -
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) -
src/cmd/link/internal/wasm/asm.go
func writeTableSec(ctxt *ld.Link, fns []*wasmFunc) { sizeOffset := writeSecHeader(ctxt, sectionTable) numElements := uint64(funcValueOffset + len(fns)) writeUleb128(ctxt.Out, 1) // number of tables ctxt.Out.WriteByte(0x70) // type: anyfunc ctxt.Out.WriteByte(0x00) // no max writeUleb128(ctxt.Out, numElements) // min writeSecSize(ctxt, sizeOffset) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 16:17:48 UTC 2024 - 21.9K bytes - Viewed (0)