lstm_model.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:SLAM 作者: sanjeevkumar42 项目源码 文件源码
def build_graph(self):
        with tf.variable_scope('lstm'):
            lstm_cell = LSTMCell(self.layer_size)
            rnn_cell = MultiRNNCell([lstm_cell] * self.layers)
            cell_output, self.init_state = rnn_cell(self.model_input, self.init_state)
            print("%i layers created" % self.layers)
            self.output_layer = self.__add_output_layer("fc_out", cell_output, self.layer_size, self.output_dim)

            self.output_layer = tf.Print(self.output_layer, [self.output_layer, tf.convert_to_tensor(self.ground_truth)],
                                          'Value of output layer and ground truth:', summarize=6)

            tf.histogram_summary('lstm_output', self.output_layer)

            return self.output_layer
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号