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

Function init_params

misc/skipthoughts.py:254–266  ·  view source on GitHub ↗

initialize all parameters needed for the encoder

(options)

Source from the content-addressed store, hash-verified

252
253
254def init_params(options):
255 """
256 initialize all parameters needed for the encoder
257 """
258 params = OrderedDict()
259
260 # embedding
261 params['Wemb'] = norm_weight(options['n_words_src'], options['dim_word'])
262
263 # encoder: GRU
264 params = get_layer(options['encoder'])[0](options, params, prefix='encoder',
265 nin=options['dim_word'], dim=options['dim'])
266 return params
267
268
269def init_params_bi(options):

Callers 1

load_modelFunction · 0.85

Calls 2

norm_weightFunction · 0.85
get_layerFunction · 0.85

Tested by

no test coverage detected