A deterministic random uniform if seed is passed.
(self, shape, minval, maxval, dtype)
| 791 | shape=shape, mean=mean, stddev=stddev, dtype=dtype, seed=self.seed) |
| 792 | |
| 793 | def random_uniform(self, shape, minval, maxval, dtype): |
| 794 | """A deterministic random uniform if seed is passed.""" |
| 795 | if self.seed: |
| 796 | op = stateless_random_ops.stateless_random_uniform |
| 797 | else: |
| 798 | op = random_ops.random_uniform |
| 799 | return op( |
| 800 | shape=shape, minval=minval, maxval=maxval, dtype=dtype, seed=self.seed) |
| 801 | |
| 802 | def truncated_normal(self, shape, mean, stddev, dtype): |
| 803 | """A deterministic truncated normal if seed is passed.""" |