layers3D.py 文件源码

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

项目:reinforcement-learning-policy-gradients 作者: DarkElement75 项目源码 文件源码
def set_inpt(self, inpt, mini_batch_size, timestep_n):

        #Reshape 3d to 2d so we can softmax correctly
        self.inpt = inpt.reshape((mini_batch_size*timestep_n, self.n_in))

        #The wx+b changes our 2d input to be the correct output shape
        self.inpt = softmax(T.dot(self.inpt, self.w) + self.b)

        #Finally, now that we have the correct output shape, we 
        #Convert back to 3d, making sure to use self.n_out, since this is the output
        #And it's already correctly shaped, just in 2d.
        self.output = self.inpt.reshape((mini_batch_size, timestep_n, self.n_out))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号