Download scripts/find_max_batch.ps1 from cuibinge/typical-marine-ecological-feature-recognition-code: direct link, hf CLI and curl.
- Browser
- Download file 512 Bytes
-
https://huggingface.co/cuibinge/typical-marine-ecological-feature-recognition-code/resolve/main/scripts/find_max_batch.ps1
- Command line
-
hf download hf://cuibinge/typical-marine-ecological-feature-recognition-code/scripts/find_max_batch.ps1
-
curl -L -o find_max_batch.ps1 https://huggingface.co/cuibinge/typical-marine-ecological-feature-recognition-code/resolve/main/scripts/find_max_batch.ps1
512 Bytes
| param( | |
| [string]$Config = "configs/train_2gpu_4090d.json", | |
| [int]$Start = 8, | |
| [int]$Stop = 32, | |
| [int]$Step = 2 | |
| ) | |
| $ErrorActionPreference = "Continue" | |
| for ($batch = $Start; $batch -le $Stop; $batch += $Step) { | |
| Write-Host "Trying per-GPU batch=$batch" | |
| powershell -ExecutionPolicy Bypass -File scripts/train_2gpu.ps1 -Config $Config -BatchSize $batch -Epochs 1 | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "Failed at per-GPU batch=$batch. Use the previous successful value." | |
| exit 0 | |
| } | |
| } | |