nakas commited on
Commit
c3fb333
·
1 Parent(s): d67b2d2

Update audio_style_transfer/models/timedomain.py

Browse files
audio_style_transfer/models/timedomain.py CHANGED
@@ -231,7 +231,7 @@ def compute_stylization(kernels,
231
  net = tf.nn.relu(conv)
232
  content_loss = content_loss + \
233
  alpha * 2 * tf.nn.l2_loss(net - content_features[layer_i + 1])
234
- _, height, width, number = map(lambda i: i.value, net.get_shape())
235
  feats = tf.reshape(net, (-1, number))
236
  gram = tf.matmul(tf.transpose(a=feats), feats) / (n_frames)
237
  style_loss = style_loss + 2 * tf.nn.l2_loss(gram - style_gram[
 
231
  net = tf.nn.relu(conv)
232
  content_loss = content_loss + \
233
  alpha * 2 * tf.nn.l2_loss(net - content_features[layer_i + 1])
234
+ _, height, width, number = map(lambda i: i, net.get_shape())
235
  feats = tf.reshape(net, (-1, number))
236
  gram = tf.matmul(tf.transpose(a=feats), feats) / (n_frames)
237
  style_loss = style_loss + 2 * tf.nn.l2_loss(gram - style_gram[