Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Namespace' object has no attribute 'validation_batch_size' #2457

Closed
banpeiran opened this issue Mar 21, 2025 · 2 comments
Closed

'Namespace' object has no attribute 'validation_batch_size' #2457

banpeiran opened this issue Mar 21, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@banpeiran
Copy link

Describe the bug
A clear and concise description of what the bug is.
The bug occurs when I use the official script for training:
D:\USERS\PYTHONPROJECT\pytorch-image-models-main> python train.py --data-dir dataset/transfires --epochs 50 --batch-size 64 --input-size 3 224 224 --opt adamw --lr 1e-3
--num-classes 2 --model resnet50
Training with a single process on 1 device (cuda).
Model resnet50 created, param count:23512130
Data processing configuration for current model + dataset:
input_size: (3, 224, 224)
interpolation: bicubic
mean: (0.485, 0.456, 0.406)
std: (0.229, 0.224, 0.225)
crop_pct: 0.95
crop_mode: center
Created AdamW (adamw) optimizer: lr: 0.001, betas: (0.9, 0.999), eps: 1e-08, weight_decay: 2e-05, amsgrad: False, foreach: None, maximize: False, capturable: False, differentiable: Fal
se, fused: None
AMP not enabled. Training in torch.float32.
Traceback (most recent call last):
File "D:\USERS\PYTHONPROJECT\pytorch-image-models-main\train.py", line 1235, in
main()
File "D:\USERS\PYTHONPROJECT\pytorch-image-models-main\train.py", line 762, in main
batch_size=args.validation_batch_size or args.batch_size,
AttributeError: 'Namespace' object has no attribute 'validation_batch_size'

@banpeiran banpeiran added the bug Something isn't working label Mar 21, 2025
@rwightman
Copy link
Collaborator

@banpeiran are you sure you've synced the latest train.py script from here? Latest timm release with latest train script has no issues for me.

@rwightman
Copy link
Collaborator

booted up windows test machine to check for any platform issues, there's no problem with current train.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants