rnin.py 文件源码

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

项目:deel 作者: uei 项目源码 文件源码
def classify(self,x=None,train=False):
        if x is None:
            x=Tensor.context

        image = x.value
        self.x_batch = image
        xp = Deel.xp
        x_data = xp.asarray(self.x_batch,dtype=Deel.xp.float32)

        x = chainer.Variable(x_data, volatile='off' if train else 'on')
        score = self.forward(x)

        score = F.softmax(score)

        score = Variable(score.data) #Unchain 
        t = ChainerTensor(score)
        t.owner=self
        t.use()
        return t
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号