Skip to content

Commit

Permalink
Fix problem with normalization layer lambda.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalivenko committed Jun 13, 2019
1 parent 3fcf870 commit 83a8c58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pytorch2keras/normalization_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def convert_instancenorm(params, w_name, scope_name, inputs, layers, weights, na
beta = weights[bias_name].numpy()

def target_layer(x, epsilon=params['epsilon'], gamma=gamma, beta=beta):
import tensorflow as tf
layer = tf.contrib.layers.instance_norm(
x,
param_initializers={'beta': tf.constant_initializer(beta), 'gamma': tf.constant_initializer(gamma)},
Expand Down

0 comments on commit 83a8c58

Please sign in to comment.