googlenet.py 文件源码

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

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

        if not isinstance(x,ImageTensor):
            x=Input(x)

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

        x = chainer.Variable(x_data, volatile=True)

        score = self.predict(x)

        score = F.softmax(score)

        score = Variable(score.data) #Unchain 
        t = ChainerTensor(score)
        t.owner=self
        t.use()

        return t
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号