main.py 文件源码

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

项目:dvae 作者: dojoteef 项目源码 文件源码
def device_fn(device):
    """ Returns a function that given a tf.Operation it returns what device to put it on """
    def function(operation):
        """ Given a tf.Operation returns what device to put it on """
        if operation.type in _CPU_OPERATIONS:
            return '/cpu:0'
        else:
            return device

    return function
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号