Team Ai
Modelpublic

cuibinge/typical-marine-ecological-feature-recognition-code

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
find_max_batch.ps117 linesDownload Raw Back to scripts
1param(
2  [string]$Config = "configs/train_2gpu_4090d.json",
3  [int]$Start = 8,
4  [int]$Stop = 32,
5  [int]$Step = 2
6)
7
8$ErrorActionPreference = "Continue"
9for ($batch = $Start; $batch -le $Stop; $batch += $Step) {
10  Write-Host "Trying per-GPU batch=$batch"
11  powershell -ExecutionPolicy Bypass -File scripts/train_2gpu.ps1 -Config $Config -BatchSize $batch -Epochs 1
12  if ($LASTEXITCODE -ne 0) {
13    Write-Host "Failed at per-GPU batch=$batch. Use the previous successful value."
14    exit 0
15  }
16}
17