使用GPU加速的Microsoft Azure虚拟机

我正在尝试在Azure上构建一个用于模型训练的虚拟机。我找到了这个Data Science Virtual Machine for Linux (Ubuntu)虚拟机,看起来是一个合适的选择。

不幸的是,当我启动虚拟机并安装了caffe的先决条件后,我无法运行测试。在执行make runtest时遇到了以下错误(make allmake test都已无错误完成):

NVIDIA: no NVIDIA devices foundCuda number of devices: 0Setting to use device 0Current device id: 0Current device name: Note: Randomizing tests' orders with a seed of 97204 .[==========] Running 2041 tests from 267 test cases.[----------] Global test environment set-up.[----------] 11 tests from AdaDeltaSolverTest/3, where TypeParam = caffe::GPUDevice<double>[ RUN      ] AdaDeltaSolverTest/3.TestAdaDeltaLeastSquaresUpdateWithHalfMomentumNVIDIA: no NVIDIA devices foundE0715 02:24:32.097311 59355 common.cpp:114] Cannot create Cublas handle. Cublas won't be available.NVIDIA: no NVIDIA devices foundE0715 02:24:32.103780 59355 common.cpp:121] Cannot create Curand generator. Curand won't be available.F0715 02:24:32.103914 59355 test_gradient_based_solver.cpp:80] Check failed: error == cudaSuccess (30 vs. 0)  unknown error*** Check failure stack trace: ***    @     0x7f77a463f5cd  google::LogMessage::Fail()    @     0x7f77a4641433  google::LogMessage::SendToLog()    @     0x7f77a463f15b  google::LogMessage::Flush()    @     0x7f77a4641e1e  google::LogMessageFatal::~LogMessageFatal()    @           0x7115e3  caffe::GradientBasedSolverTest<>::TestLeastSquaresUpdate()    @           0x7122af  caffe::AdaDeltaSolverTest_TestAdaDeltaLeastSquaresUpdateWithHalfMomentum_Test<>::TestBody()    @           0x8e6023  testing::internal::HandleExceptionsInMethodIfSupported<>()    @           0x8df63a  testing::Test::Run()    @           0x8df788  testing::TestInfo::Run()    @           0x8df865  testing::TestCase::Run()    @           0x8e0b3f  testing::internal::UnitTestImpl::RunAllTests()    @           0x8e0e63  testing::UnitTest::Run()    @           0x466ecd  main    @     0x7f77a111c830  __libc_start_main    @           0x46e589  _start    @              (nil)  (unknown)Makefile:532: recipe for target 'runtest' failedmake: *** [runtest] Aborted (core dumped)

在Azure上是否可以启动一个适合使用caffe进行GPU加速机器学习的虚拟机?

关于虚拟机的所有详细信息请查看这里enter image description here


回答:

Ubuntu的Data Science Virtual Machine (DSVM)已经在/opt/caffe中安装了Caffe。要在GPU上使用它,请通过选择NC系列之一来创建一个带有K80 GPU的虚拟机。(请确保选择HDD作为存储类型,否则NC系列不会显示。)然后Caffe将可以直接使用。

另外请注意,PyCaffe也是可用的。在终端中执行:

source activate root

然后Python将可以使用PyCaffe。

Related Posts

L1-L2正则化的不同系数

我想对网络的权重同时应用L1和L2正则化。然而,我找不…

使用scikit-learn的无监督方法将列表分类成不同组别,有没有办法?

我有一系列实例,每个实例都有一份列表,代表它所遵循的不…

f1_score metric in lightgbm

我想使用自定义指标f1_score来训练一个lgb模型…

通过相关系数矩阵进行特征选择

我在测试不同的算法时,如逻辑回归、高斯朴素贝叶斯、随机…

可以将机器学习库用于流式输入和输出吗?

已关闭。此问题需要更加聚焦。目前不接受回答。 想要改进…

在TensorFlow中,queue.dequeue_up_to()方法的用途是什么?

我对这个方法感到非常困惑,特别是当我发现这个令人费解的…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注