(nin,nout=None, scale=0.1, ortho=True)
| 331 | |
| 332 | |
| 333 | def norm_weight(nin,nout=None, scale=0.1, ortho=True): |
| 334 | if nout == None: |
| 335 | nout = nin |
| 336 | if nout == nin and ortho: |
| 337 | W = ortho_weight(nin) |
| 338 | else: |
| 339 | W = numpy.random.uniform(low=-scale, high=scale, size=(nin, nout)) |
| 340 | return W.astype('float32') |
| 341 | |
| 342 | |
| 343 | def param_init_gru(options, params, prefix='gru', nin=None, dim=None): |
no test coverage detected