V0.2 weight_norm question

Hi everyone,

I’m trying to apply newly added weight_norm to nn.GRU.

But it seems weight_norm only accept single name (default: ‘weight’) per call.

As you know, nn.GRU has #(layer x 2) separate weight variables named weight_ih_l[k] and weight_hh_l[k].

I wonder what would be most elegant way to apply the weight_norm to all those weight variables.

Thanks!

have you tried the solution in this post? Built-in weight_norm on RNN

Oh, It could work. thanks.

Think it would be nicer if weight_norm could take name list as argument. :grinning: