firmai/tsgan

Possible dims mistmatch in Time GAN

FrancescoSaverioZuppichini opened this issue · 0 comments

Dear all,

In the TimeGAN implementation you define the reconstruction loss as:

E_loss_T0 = tf.losses.mean_squared_error(X, X_tilde)

E_loss_T0 = tf.losses.mean_squared_error(X, X_tilde)

Where X must have dims [BATCH, SEQ_LEN, INPUT_SIZE] and so X_tilde but X_tilde is generated using a RNN + FC (even if the paper stated that only a FC was used) so the output is a two dims vector [BATCH, INPUT_SIZE] since it is defined as

    def recovery (H, T):      
      
        with tf.variable_scope("recovery", reuse = tf.AUTO_REUSE):       
              
            r_cell = tf.nn.rnn_cell.MultiRNNCell([rnn_cell(module_name) for _ in range(num_layers)])
                
            r_outputs, r_last_states = tf.nn.dynamic_rnn(r_cell, H, dtype=tf.float32, sequence_length = T)
            
            X_tilde = tf.contrib.layers.fully_connected(r_outputs, data_dim, activation_fn=tf.nn.sigmoid) 

        return X_tilde

Therefore the dimensions are wrong and the loss is not complete. Am I wrong?

Thank you,

Francesco Saverio Zuppichini