TomRB22 commited on
Commit
523a819
1 Parent(s): 11cac8a

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +4 -4
model.py CHANGED
@@ -1,13 +1,13 @@
1
  import tensorflow as tf
2
 
3
 
4
- CAP = 3501 # Cap for the number of notes
5
 
6
  class Encoder_Z(tf.keras.layers.Layer):
7
 
8
  def __init__(self, dim_z, name="encoder", **kwargs):
9
  super(Encoder_Z, self).__init__(name=name, **kwargs)
10
- self.dim_x = (3, CAP, 1)
11
  self.dim_z = dim_z
12
 
13
  def build(self):
@@ -45,8 +45,8 @@ class Decoder_X(tf.keras.layers.Layer):
45
  layers.append(tf.keras.layers.Dense(2000))
46
  layers.append(tf.keras.layers.ReLU())
47
 
48
- layers.append(tf.keras.layers.Dense((CAP - 1) / 2 * 32, activation=None))
49
- layers.append(tf.keras.layers.Reshape((1, int((CAP - 1) / 2), 32)))
50
 
51
  layers.append(tf.keras.layers.Conv2DTranspose(
52
  filters=64, kernel_size=3, strides=2, padding='valid'))
 
1
  import tensorflow as tf
2
 
3
 
4
+ _CAP = 3501 # Cap for the number of notes
5
 
6
  class Encoder_Z(tf.keras.layers.Layer):
7
 
8
  def __init__(self, dim_z, name="encoder", **kwargs):
9
  super(Encoder_Z, self).__init__(name=name, **kwargs)
10
+ self.dim_x = (3, _CAP, 1)
11
  self.dim_z = dim_z
12
 
13
  def build(self):
 
45
  layers.append(tf.keras.layers.Dense(2000))
46
  layers.append(tf.keras.layers.ReLU())
47
 
48
+ layers.append(tf.keras.layers.Dense((_CAP - 1) / 2 * 32, activation=None))
49
+ layers.append(tf.keras.layers.Reshape((1, int((_CAP - 1) / 2), 32)))
50
 
51
  layers.append(tf.keras.layers.Conv2DTranspose(
52
  filters=64, kernel_size=3, strides=2, padding='valid'))