A deterministic random normal if seed is passed.
(self, shape, mean=0.0, stddev=1, dtype=dtypes.float32)
| 782 | self.seed = None |
| 783 | |
| 784 | def random_normal(self, shape, mean=0.0, stddev=1, dtype=dtypes.float32): |
| 785 | """A deterministic random normal if seed is passed.""" |
| 786 | if self.seed: |
| 787 | op = stateless_random_ops.stateless_random_normal |
| 788 | else: |
| 789 | op = random_ops.random_normal |
| 790 | return op( |
| 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.""" |