gputools.py 文件源码

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

项目:tensorflow-layer-library 作者: bioinf-jku 项目源码 文件源码
def __init__(self):
        self.devices = device_lib.list_local_devices()
        self.cpus = [x.name for x in self.devices if x.device_type == 'CPU']
        self.gpus = [x.name for x in self.devices if x.device_type == 'GPU']
        self.iterate_cpus = it.cycle(self.cpus)
        self.iterate_gpus = it.cycle(self.gpus)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号