Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 40 for num_elements (0.54 sec)

  1. 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)
  2. 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)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go

    	}
    	return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.ObjectKind}, nil
    }
    
    // TestObjectFuzzer can randomly populate all the above objects.
    var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs(
    	func(j *runtimetesting.MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) {
    		c.FuzzNoCustom(j)
    		j.APIVersion = ""
    		j.ObjectKind = ""
    	},
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go

    }
    
    func getObjectMetaAndOwnerReferences() (myAPIObject2 MyAPIObject2, metaOwnerReferences []metav1.OwnerReference) {
    	scheme := runtime.NewScheme()
    	codecs := serializer.NewCodecFactory(scheme)
    	fuzz.New().NilChance(.5).NumElements(1, 5).Funcs(metafuzzer.Funcs(codecs)...).MaxDepth(10).Fuzz(&myAPIObject2)
    	references := myAPIObject2.ObjectMeta.OwnerReferences
    	// This is necessary for the test to pass because the getter will return a
    	// non-nil slice.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 14 10:11:56 UTC 2022
    - 12.9K bytes
    - Viewed (0)
  5. tensorflow/cc/framework/cc_op_gen_util.cc

      strings::StrAppend(&ret, "}");
      return ret;
    }
    
    string PrintTensor(const TensorProto& tensor_proto) {
      Tensor t(tensor_proto.dtype());
      CHECK(t.FromProto(tensor_proto));
      const int64_t num_elts = t.NumElements();
      switch (t.dtype()) {
        case DT_FLOAT:
          return PrintArray(num_elts, t.flat<float>().data());
        case DT_DOUBLE:
          return PrintArray(num_elts, t.flat<double>().data());
        case DT_INT32:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 00:57:05 UTC 2024
    - 25K bytes
    - Viewed (0)
  6. src/syscall/types_windows.go

    }
    
    type CertTrustListInfo struct {
    	// Not implemented
    }
    
    type CertSimpleChain struct {
    	Size                       uint32
    	TrustStatus                CertTrustStatus
    	NumElements                uint32
    	Elements                   **CertChainElement
    	TrustListInfo              *CertTrustListInfo
    	HasRevocationFreshnessTime uint32
    	RevocationFreshnessTime    uint32
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/conversion_test.go

    	depth := 0
    	maxDepth := 3
    	nilChance := func(depth int) float64 {
    		return math.Pow(0.9, math.Max(0.0, float64(maxDepth-depth)))
    	}
    	updateFuzzer := func(depth int) {
    		f.NilChance(nilChance(depth))
    		f.NumElements(0, max(0, maxDepth-depth))
    	}
    	updateFuzzer(depth)
    	enter := func(o interface{}, recursive bool, c fuzz.Continue) {
    		if recursive {
    			depth++
    			updateFuzzer(depth)
    		}
    
    		invisible++
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 14:34:26 UTC 2023
    - 23.2K bytes
    - Viewed (0)
  8. tensorflow/c/eager/tape.h

    template <typename Gradient, typename BackwardFunction, typename TapeTensor>
    class VSpace {
     public:
      virtual ~VSpace() {}
    
      // Returns the number of elements in the gradient tensor.
      virtual int64_t NumElements(Gradient* tensor) const = 0;
    
      // Consumes references to the tensors in the gradient_tensors list and returns
      // a tensor with the result.
      virtual Gradient* AggregateGradients(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 02 12:40:29 UTC 2024
    - 47.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/handler_test.go

    	codecs = runtimeserializer.NewCodecFactory(scheme)
    }
    
    func fuzzAPIGroups(atLeastNumGroups, maxNumGroups int, seed int64) apidiscoveryv2.APIGroupDiscoveryList {
    	fuzzer := fuzz.NewWithSeed(seed)
    	fuzzer.NumElements(atLeastNumGroups, maxNumGroups)
    	fuzzer.NilChance(0)
    	fuzzer.Funcs(func(o *apidiscoveryv2.APIGroupDiscovery, c fuzz.Continue) {
    		c.FuzzNoCustom(o)
    
    		// The ResourceManager will just not serve the group if its versions
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 02 00:29:39 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  10. tensorflow/cc/gradients/math_grad_test.cc

        std::vector<Tensor> grad_result;
        TF_EXPECT_OK(
            session.Run({{x, {-3.0f, 0.0f, 3.0f}}}, grad_outputs, &grad_result));
        EXPECT_EQ(grad_result.size(), 1);
        EXPECT_EQ(grad_result[0].NumElements(), 3);
        EXPECT_EQ(grad_result[0].flat<float>()(0), 0.0f);
        EXPECT_EQ(grad_result[0].flat<float>()(1), 0.0f);
        EXPECT_EQ(grad_result[0].flat<float>()(2), 0.0f);
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 25 18:20:20 UTC 2023
    - 36K bytes
    - Viewed (0)
Back to top