rhn.py 文件源码

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

项目:deep-models 作者: LaurentMazare 项目源码 文件源码
def preprocess_input(self, x):
    if self.consume_less == 'cpu':
      input_shape = self.input_spec[0].shape
      input_dim = input_shape[2]
      timesteps = input_shape[1]

      x_t = time_distributed_dense(x, self.W_t, self.b_t, self.dropout_W,
                                   input_dim, self.output_dim, timesteps)
      x_h = time_distributed_dense(x, self.W_h, self.b_h, self.dropout_W,
                                   input_dim, self.output_dim, timesteps)
      return K.concatenate([x_t, x_h], axis=2)
    else:
      return x
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号