tysam-code / hlb-cifar10 Goto Github PK
View Code? Open in Web Editor NEWTrain to 94% on CIFAR-10 in <6.3 seconds on a single A100. Or ~95.79% in ~110 seconds (or less!)
Home Page: https://twitter.com/hi_tysam
License: Apache License 2.0
Train to 94% on CIFAR-10 in <6.3 seconds on a single A100. Or ~95.79% in ~110 seconds (or less!)
Home Page: https://twitter.com/hi_tysam
License: Apache License 2.0
--------------------------------------------------------------------------------------------------------
| epoch | train_loss | val_loss | train_acc | val_acc | ema_val_acc | total_time_seconds |
--------------------------------------------------------------------------------------------------------
Traceback (most recent call last):
File "main.py", line 621, in <module>
main()
File "main.py", line 540, in main
for epoch_step, (inputs, targets) in enumerate(get_batches(data, key='train', batchsize=batchsize)):
File "main.py", line 428, in get_batches
images = batch_crop(data_dict[key]['images'], 32) # TODO: hardcoded image size for now?
File "main.py", line 390, in batch_crop
cropped_batch = torch.masked_select(inputs, crop_mask_batch).view(inputs.shape[0], inputs.shape[1], crop_size, crop_size)
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 4.58 GiB (GPU 0; 5.81 GiB total capacity; 835.23 MiB already allocated; 2.35 GiB free; 1.24 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
I have not looked at the code too closely, but it might be possible to shave off a few MB when preparing batches.
Thank you for this comment by the way.
Line 523 in 132829f
I totally forgot to add torch.cuda.synchronize()
, but it is finally fixed https://github.com/99991/cifar10-fast-simple Fortunately, it did not make much of a difference. I now get 14.3 seconds with my code vs 15.7 seconds with your code. Perhaps there is something during batch preparation which makes a difference?
Hi,
Thanks for this juicy work - I would like to ask you if you can explain what is and why you use the whitening procedure?
Thanks,
Guglielmo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.