Files
ProStock/src/scripts/check_gpu.py
liaozhaorun 36a3ccbcc8 feat(training): 新增 TabM 模型支持及数据质量优化
- 添加 TabMModel、TabPFNModel 深度学习模型实现
- 新增 DataQualityAnalyzer 进行训练前数据质量诊断
- 改进数据处理器 NaN/null 双重处理,增强数据鲁棒性
- 支持 train_skip_days 参数跳过训练初期数据不足期
- Pipeline 自动清理标签为 NaN 的样本
2026-03-31 23:11:21 +08:00

15 lines
500 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import torch
# 查看 PyTorch 版本(关键!)
print(f"PyTorch 版本: {torch.__version__}")
# CPU 版本会显示: 2.6.0+cpu
# GPU 版本会显示: 2.6.0+cu118 / 2.6.0+cu121 / 2.6.0+cu124 等
# 检查 CUDA 是否可用
print(f"CUDA 可用: {torch.cuda.is_available()}")
# 如果有 CUDA查看版本
if torch.cuda.is_available():
print(f"CUDA 版本: {torch.version.cuda}")
print(f"GPU 数量: {torch.cuda.device_count()}")
print(f"GPU 名称: {torch.cuda.get_device_name(0)}")