zoukankan      html  css  js  c++  java
  • 检查PyTorch-cuda-cudnn版本

    #检查PyTorch-cuda-cudnn版本
    
    import torch
    
    torch.version # PyTorch version
    torch.version.cuda # Corresponding CUDA version
    torch.backends.cudnn.version() # Corresponding cuDNN version
    torch.cuda.get_device_name(0) # GPU type

    import torch
    print(torch.__version__)
    print('CUDA available: ' + str(torch.cuda.is_available()))
    print('cuDNN version: ' + str(torch.backends.cudnn.version()))
    a = torch.cuda.FloatTensor(2).zero_()
    print('Tensor a = ' + str(a))
    b = torch.randn(2).cuda()
    print('Tensor b = ' + str(b))
    c = a + b
    print('Tensor c = ' + str(c))
    
    import torchvision
    print(torchvision.__version__)
    
    
    
     
  • 相关阅读:
    docker commit
    镜像原理
    docker command1
    docker镜像命令
    docker work machine
    视图
    后台管理
    模型类
    docker command
    安装virtualenv
  • 原文地址:https://www.cnblogs.com/jeshy/p/14280878.html
Copyright © 2011-2022 走看看