(module, weight_init, bias_init, gain=1)
| 233 | |
| 234 | |
| 235 | def init(module, weight_init, bias_init, gain=1): |
| 236 | weight_init(module.weight.data, gain=gain) |
| 237 | bias_init(module.bias.data) |
| 238 | return module |
| 239 | |
| 240 | |
| 241 | # https://github.com/openai/baselines/blob/master/baselines/common/tf_util.py #L87 |