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)
| 1635 | |
| 1636 | |
| 1637 | def uniform(low, high, t): |
| 1638 | '''Generate values following a Uniform distribution. |
| 1639 | |
| 1640 | Args: |
| 1641 | low (float): the lower bound |
| 1642 | high (float): the higher bound |
| 1643 | t (Tensor): the results are put into t |
| 1644 | |
| 1645 | Returns: |
| 1646 | t |
| 1647 | ''' |
| 1648 | singa.Uniform(float(low), float(high), t.data) |
| 1649 | return t |
| 1650 | |
| 1651 | |
| 1652 | def add_column(alpha, v, beta, M): |