Commit dff49930 authored by Laanait, Nouamane's avatar Laanait, Nouamane
Browse files

putting freq2space module back into ynet decoder branches

parent ae82905a
Pipeline #82519 failed with stage
in 1 minute and 40 seconds
......@@ -2855,15 +2855,15 @@ class YNet(FCDenseNet, FCNet):
'activation': "relu",
'padding': 'SAME',
'batch_norm': True, 'dropout':0})
# def fc_map(tens):
# for i in range(num_fc):
# with tf.variable_scope('%s_fc_%d' %(subnet, i), reuse=self.reuse) as scope :
# tens = self._linear(input=tens, params=fully_connected)
# tens = self._activate(input=tens, params=fully_connected)
# scopes_list.append(scope)
# return tens
# out = tf.map_fn(fc_map, out, back_prop=True)
# out = tf.transpose(out, perm= [1, 2, 0])
def fc_map(tens):
for i in range(num_fc):
with tf.variable_scope('%s_fc_%d' %(subnet, i), reuse=self.reuse) as scope :
tens = self._linear(input=tens, params=fully_connected)
tens = self._activate(input=tens, params=fully_connected)
scopes_list.append(scope)
return tens
out = tf.map_fn(fc_map, out, back_prop=True)
out = tf.transpose(out, perm= [1, 2, 0])
dim = int(math.sqrt(self.images.shape.as_list()[1]))
out = tf.reshape(out, [self.params['batch_size'], -1, dim, dim])
self.print_rank('decoder reshape:', out.shape.as_list())
......
......@@ -561,6 +561,7 @@ def train_YNet(network_config, hyper_params, params, gpu_id=None):
#######################################
# optimizer for unsupervised step
var_list = [itm for itm in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES) if 'CVAE' in str(itm.name)]
var_list = None
reg_hyper = deepcopy(hyper_params)
reg_hyper['initial_learning_rate'] = 1e-1
def learning_policy_func_reg(step):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment