Пример #1
0
 def __init__(self, seed=None):
     """A `Dataset` of pseudorandom values."""
     self._seed, self._seed2 = random_seed.get_seed(seed)
     variant_tensor = gen_experimental_dataset_ops.experimental_random_dataset(
         seed=self._seed,
         seed2=self._seed2,
         **dataset_ops.flat_structure(self))
     super(RandomDatasetV2, self).__init__(variant_tensor)
Пример #2
0
 def __init__(self, seed=None):
   """A `Dataset` of pseudorandom values."""
   self._seed, self._seed2 = random_seed.get_seed(seed)
   if compat.forward_compatible(2019, 8, 3):
     variant_tensor = gen_experimental_dataset_ops.random_dataset(
         seed=self._seed, seed2=self._seed2, **self._flat_structure)
   else:
     variant_tensor = gen_experimental_dataset_ops.experimental_random_dataset(
         seed=self._seed, seed2=self._seed2, **self._flat_structure)
   super(RandomDatasetV2, self).__init__(variant_tensor)
Пример #3
0
 def __init__(self, seed=None):
   """A `Dataset` of pseudorandom values."""
   self._seed, self._seed2 = random_seed.get_seed(seed)
   variant_tensor = gen_experimental_dataset_ops.experimental_random_dataset(
       seed=self._seed, seed2=self._seed2, **dataset_ops.flat_structure(self))
   super(RandomDatasetV2, self).__init__(variant_tensor)
Пример #4
0
 def _as_variant_tensor(self):
   return gen_experimental_dataset_ops.experimental_random_dataset(
       seed=self._seed,
       seed2=self._seed2,
       **dataset_ops.flat_structure(self))