(self)
Assume a_0 = 1
Assume a_0 = 1
Assume a_0 = 1
def _build_IIR_filtering_graphs(self):
        """
        Assume a_0 = 1
        """
        self.input_image = tf.placeholder(tf.float32,
                                          [1, self.image_height,
                                              self.image_width,
                                           self.n_channels],
                                          name='input_image')
        self.filtered_enc = tf.placeholder(tf.float32,
                                           [1, None, None,
                                            self.shape_dims],
                                           name='filtered_enc')
        self.out_texture_enc = tf.placeholder(tf.float32,
                                              [1, None, None,
                                               self.texture_dims],
                                              name='out_texture_enc')
        self.ref_shape_enc = tf.placeholder(tf.float32,
                                            [1, None, None,
                                             self.shape_dims],
                                            name='ref_shape_enc')
        self.amplification_factor = tf.placeholder(tf.float32, [None],
                                                   name='amplification_factor')
        with tf.variable_scope('ynet_3frames'):
            with tf.variable_scope('encoder'):
                self.texture_enc, self.shape_rep = \
                    self._encoder(self.input_image)
            with tf.variable_scope('manipulator'):
                # set encoder a to zero because we do temporal filtering
                # instead of taking the difference.
                self.out_shape_enc = self.manipulator(0.0,
                                                      self.filtered_enc,
                                                      self.amplification_factor)
                self.out_shape_enc += self.ref_shape_enc - self.filtered_enc
            with tf.variable_scope('decoder'):
                self.output_image = tf.clip_by_value(
                                        self._decoder(self.out_texture_enc,
                                                      self.out_shape_enc),
                                        -1.0, 1.0)

        self.saver = tf.train.Saver()
def _build_IIR_filtering_graphs ( self ) : self . input_image = tf . placeholder ( tf . float32 , [ 1 , self . image_height , self . image_width , self . n_channels ] , name = 'input_image' ) self . filtered_enc = tf . placeholder ( tf . float32 , [ 1 , None , None , self . shape_dims ] , name = 'filtered_enc' ) self . out_texture_enc = tf . placeholder ( tf . float32 , [ 1 , None , None , self . texture_dims ] , name = 'out_texture_enc' ) self . ref_shape_enc = tf . placeholder ( tf . float32 , [ 1 , None , None , self . shape_dims ] , name = 'ref_shape_enc' ) self . amplification_factor = tf . placeholder ( tf . float32 , [ None ] , name = 'amplification_factor' ) with tf . variable_scope ( 'ynet_3frames' ) : with tf . variable_scope ( 'encoder' ) : self . texture_enc , self . shape_rep = self . _encoder ( self . input_image ) with tf . variable_scope ( 'manipulator' ) : # set encoder a to zero because we do temporal filtering # instead of taking the difference. self . out_shape_enc = self . manipulator ( 0.0 , self . filtered_enc , self . amplification_factor ) self . out_shape_enc += self . ref_shape_enc - self . filtered_enc with tf . variable_scope ( 'decoder' ) : self . output_image = tf . clip_by_value ( self . _decoder ( self . out_texture_enc , self . out_shape_enc ) , - 1.0 , 1.0 ) self . saver = tf . train . Saver ( )