Comments (12)
My PC Specifications:
Lower-Mid Spec PC
AMD A8-6600K APU with Radeon(tm) HD Graphics 3.90 GHz
8.0 GB DDR3 1333 MHz
WD5000AZRX HDD
Problem: MemoryError while saving Pickle, same as OP @marius851000
Solution: Changed line 96 if len(training_data) == 500:
to if len(training_data) == 200:
Result: Pickle Saved Successfully
Issue has been resolved! @Sentdex
Thanks to @germanmarky
from pygta5.
@marius851000 can you give us more info?
- How much RAM does your machine have?
- Are you resizing the image?
- Are they RGB images?
- How much free space do you have on the drive you are saving them?
I see that there is already a file saved, was that captured with no changes to 1. collect_data.py?
from pygta5.
Have you changed where it should save the training data?
from pygta5.
-
I have 3,9 Go of ram
-
I have used the script without modification
-
I have approximatively 300 Go of free space
-
Yes, I've alrealy lauched the script once, It write a file of 60o, but it have also say an error
-
I've havent changed the default place of the training data
from pygta5.
from pygta5.
Having the same issue, almost the same configuration. I got my resources free, RAM 8 GB, 3 gigs free. Unable to record any training data. Any solutions? Did the OP find solution to his problem?
Btw, I am saving my training data, in the directory where the script is located, my D drive. Do I need to move it to C, for some reason?
from pygta5.
@CT83, when running the capture script run Task Manager. If your RAM gets to about 80-90% allocated during the save process, the ndarray is to large to save. Make sure to close out all other unneeded applications that are RAM intensive which can be checked in Task Manager as well.
What you can do is change the max size of the array from 500 to 300 or even less. The actual size is arbitrary, you can increase or decrease the max size to fit the resources better in your system.
For example, I have 32GB of RAM and can capture a 2GB output file before worrying about running out of memory.
from pygta5.
Oh Thanks. Yes, @germanmarky, I was researching the problem myself later and I thought of the same thing. Stackoverflow suggested using python64, I think I should switch to it for performance. I haven't looked over the training script yet. Do I need to make any changes to it? Btw what do you think about Hickle?
from pygta5.
I attempted to use HDF5 for saving and loading as it's much more memory efficient but had issues matching up the containers on load and validating that the data was formatted correctly so just stayed with np.save().
I am also using Anaconda 4.1 64-bit and python 3.5 for my virtual env.
If you don't have the headroom in RAM to save the file, even 64-bit python won't help, but definitely won't hurt. I would start by dropping line 96 to 200 or 100 and keeping an eye on your RAM usage. You could also set it to 100 and comment out line 99 and see at what amount it actually fails, then just use that number.
from pygta5.
Yes, I will try that, report here. Write a proper answer with my actual specs and what value I used. And we can close this Issue. 👍🏽 Hoping that @marius851000 is okay with it. 😇
from pygta5.
Actually if anybody has another idea to solve this problem, because even by changing it to 100 doesn't help me, maybe by switching the append with something else ?
With 8GB DDR4, i can't go further than 15000 frames
from pygta5.
I had the same problem, thinking maybe it's because of data size I tried to save all at once is too big. Therefore I made it that it saves every 2000 frames, then it worked 50% of the time, meaning it could save successfully one time and would fail another time.
And then I just made changes to my virtual memory settings, adjusting it to be 2GB instead of 1GB, and then it finally worked perfectly fine.
You can find the settings for virtual memory in Computer attribute -> Advance System Settings -> Advance tab -> Performance -> Advance tab
from pygta5.
Related Issues (20)
- what is FILE_I_END in trainmodel.py HOT 1
- About multiclass classification
- gta5 models HOT 1
- ModuleNotFoundError: No module named 'tensorflow.contrib' HOT 7
- Expected shape of ndim=4, got ndim=3, test_model.py HOT 3
- is it possible to upload a pretrained model? HOT 1
- saves trained data as events.out.tfevents.1591947296.PREDATOR
- ValueError: Cannot feed value of shape (64, 4) for Tensor 'targets/Y:0', which has shape '(?, 3)' HOT 2
- "Failed to interpret file %s as a pickle" % repr(file)) HOT 3
- ModuleNotFoundError: No module named 'tflearn'
- Can someone share the trained data? Thank you HOT 2
- There is no such a thing as BalanceData.py ? HOT 2
- tensorflow/core/framework/op_kernel.cc:1763] OP_REQUIRES failed at conv_grad_filter_ops.cc:1095 : Not found: No algorithm worked!
- Can someone upload the trained model for Googlenet? HOT 4
- Keystrokes not resigtering in another game. HOT 2
- Input/output error & Duplicate node name in graph'Accuracy'
- Any HOT 1
- Create data set not working
- Audio issues while switching cameras - help needed
- ModuleNotFoundError: No module named 'alexnet' on part 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygta5.