MCPcopy
hub / github.com/hanzhanggit/StackGAN / init_params_bi

Function init_params_bi

misc/skipthoughts.py:269–283  ·  view source on GitHub ↗

initialize all paramters needed for bidirectional encoder

(options)

Source from the content-addressed store, hash-verified

267
268
269def init_params_bi(options):
270 """
271 initialize all paramters needed for bidirectional encoder
272 """
273 params = OrderedDict()
274
275 # embedding
276 params['Wemb'] = norm_weight(options['n_words_src'], options['dim_word'])
277
278 # encoder: GRU
279 params = get_layer(options['encoder'])[0](options, params, prefix='encoder',
280 nin=options['dim_word'], dim=options['dim'])
281 params = get_layer(options['encoder'])[0](options, params, prefix='encoder_r',
282 nin=options['dim_word'], dim=options['dim'])
283 return params
284
285
286def build_encoder(tparams, options):

Callers 1

load_modelFunction · 0.85

Calls 2

norm_weightFunction · 0.85
get_layerFunction · 0.85

Tested by

no test coverage detected