def _GetWeight(self, theta):
    p = self.params
    if p.weight_norm:
        filter_w = (tf.nn.l2_normalize(theta.w, [0, 1]) * tf.reshape((theta.g + 1.0), [1, 1, p.filter_shape[2], p.filter_shape[3]]))
    else:
        filter_w = theta.w
    return filter_w
def _GetWeight(self, theta):
    p = self.params
    if p.weight_norm:
        filter_w = (tf.nn.l2_normalize(theta.w, [0, 1]) * tf.reshape((theta.g + 1.0), [1, 1, p.filter_shape[2], p.filter_shape[3]]))
    else:
        filter_w = theta.w
    return filter_w