Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

without finetune_act_function in deep autoencoder #66

Open
TaoDFang opened this issue Jan 4, 2018 · 0 comments
Open

without finetune_act_function in deep autoencoder #66

TaoDFang opened this issue Jan 4, 2018 · 0 comments

Comments

@TaoDFang
Copy link

TaoDFang commented Jan 4, 2018

def _create_encoding_layers(self):
    """Create the encoding layers for supervised finetuning.
    
    :return: output of the final encoding layer.
    """
    
    next_train=self.input_data
    self.layers_nodes=[]
    for l, layer in enumerate(self.layers):
        with tf.name_scope('encode-{}'.format(l)):
            y_act=tf.add(
                    tf.matmul(next_train,self.encoding_w_[l]),
                    self.encoding_b_[l]
                    )
            if self.finetune_act_func:
                layer_y=self.finetune_act_func(y_act)
            else:
                layer_y=None    ##!!!!!!!!!!!!!! not right here
                
            # the input of the next layer is the output of the last layer
            next_train=tf.nn.dropoput(layer_y,self.keep_prob)
        self.layer_nodes.append(next_train)
    return next_train

should be : if self.finetune_act_func:
layer_y=self.finetune_act_func(y_act)
else:
layer_y=y_act

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant