Generate values following a Uniform distribution. Args: low (float): the lower bound high (float): the higher bound t (Tensor): the results are put into t Returns: t
(low, high, t)
| 1670 | |
| 1671 | |
| 1672 | def uniform(low, high, t): |
| 1673 | '''Generate values following a Uniform distribution. |
| 1674 | |
| 1675 | Args: |
| 1676 | low (float): the lower bound |
| 1677 | high (float): the higher bound |
| 1678 | t (Tensor): the results are put into t |
| 1679 | |
| 1680 | Returns: |
| 1681 | t |
| 1682 | ''' |
| 1683 | singa.Uniform(float(low), float(high), t.data) |
| 1684 | return t |
| 1685 | |
| 1686 | |
| 1687 | def add_column(alpha, v, beta, M): |