【问题标题】:How long to train cifar10 in tensorflow with a GTX 960使用 GTX 960 在 tensorflow 中训练 cifar10 需要多长时间
【发布时间】:2023-04-03 09:30:01
【问题描述】:

其他人能告诉我他们在机器上训练模型需要多长时间吗?我已经从下面的代码中发布了一些日志信息。 top 显示 python 的 cpu 使用率约为 300%,nvidia-smi 昨天显示 Volatile GPU-Util 约为 60%,但现在约为 30%。 30 小时前开始训练,现在损失在 0.10 附近振荡了大约 15 小时。我可能需要调整梯度下降的截止参数,但我希望代码能够像教程 repo 中那样运行和收敛。我按照教程here,他们说

该模型在一个 在 GPU 上几个小时的训练时间

>>> head -n20 nohup.out
...
2017-05-14 16:38:21.763013: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties: 
name: GeForce GTX 960
major: 5 minor: 2 memoryClockRate (GHz) 1.342
pciBusID 0000:01:00.0
Total memory: 1.95GiB
Free memory: 1.58GiB
2017-05-14 16:38:21.763029: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 
2017-05-14 16:38:21.763036: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0:   Y 
2017-05-14 16:38:21.763044: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 960, pci bus id: 0000:01:00.0)

Successfully downloaded cifar-10-binary.tar.gz 170052171 bytes.
Filling queue with 20000 CIFAR images before starting to train. This will take a few minutes.
2017-05-14 16:38:36.943404: step 0, loss = 4.68 (83.0 examples/sec; 1.542 sec/batch)
2017-05-14 16:38:37.983802: step 10, loss = 4.60 (1230.3 examples/sec; 0.104 sec/batch)
2017-05-14 16:38:39.199938: step 20, loss = 4.55 (1052.5 examples/sec; 0.122 sec/batch)

【问题讨论】:

    标签: tensorflow


    【解决方案1】:

    训练似乎可以随心所欲地进行。当你得到你想要的损失时,你杀死训练脚本,只要确保训练最近生成了一个检查点文件。对我来说,检查点文件位于 /tmp/cifar10_train。

    首先我尝试了kill -SIGSTOP <pid>。正如他们在教程中提到的,这并没有为评估脚本留下足够的内存,所以我用 ```kill -9 终止了训练脚本。然后我运行了评估脚本,得到了他们在教程中提到的 86% 的准确率。

    2017-05-15 22:39:35.574805: precision @ 1 = 0.865

    【讨论】:

      猜你喜欢
      • 2012-06-12
      • 2021-07-26
      • 1970-01-01
      • 2020-03-24
      • 2019-02-18
      • 1970-01-01
      • 1970-01-01
      • 2021-02-22
      • 1970-01-01
      相关资源
      最近更新 更多