Browse Source

fix a bug in initial methods

tags/v0.2.0
xuyige 6 years ago
parent
commit
818fd71fba
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      fastNLP/modules/utils.py

+ 2
- 2
fastNLP/modules/utils.py View File

@@ -32,9 +32,9 @@ def initial_parameter(net, initial_method=None):
elif initial_method == 'xavier_normal': elif initial_method == 'xavier_normal':
init_method = init.xavier_normal_ init_method = init.xavier_normal_
elif initial_method == 'kaiming_normal' or initial_method == 'msra': elif initial_method == 'kaiming_normal' or initial_method == 'msra':
init_method = init.kaiming_normal
init_method = init.kaiming_normal_
elif initial_method == 'kaiming_uniform': elif initial_method == 'kaiming_uniform':
init_method = init.kaiming_uniform
init_method = init.kaiming_uniform_
elif initial_method == 'orthogonal': elif initial_method == 'orthogonal':
init_method = init.orthogonal_ init_method = init.orthogonal_
elif initial_method == 'sparse': elif initial_method == 'sparse':


Loading…
Cancel
Save