TH1/AITrainPython/train.bat
2025-12-06 11:44:43 +08:00

43 lines
863 B
Batchfile
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.

@echo off
REM PPO训练快速启动脚本
echo ========================================
echo PPO AI训练系统
echo ========================================
echo.
REM 检查Python环境
python --version >nul 2>&1
if errorlevel 1 (
echo 错误: 未找到Python
echo 请先安装Python 3.8+
pause
exit /b 1
)
echo 检查依赖包...
pip show torch >nul 2>&1
if errorlevel 1 (
echo 未检测到PyTorch正在安装依赖...
pip install -r requirements.txt
if errorlevel 1 (
echo 依赖安装失败!
pause
exit /b 1
)
)
echo.
echo 开始训练...
echo ========================================
echo.
python train.py %*
echo.
echo ========================================
echo 训练完成!
echo 查看训练结果: tensorboard --logdir=runs
echo ========================================
pause