-
Notifications
You must be signed in to change notification settings - Fork 22
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
sim.predict make GPU full memory #233
Comments
Hello @kebitmatf, I haven't seen that behaviour before, do you have a minimal example to help debug the issue? |
Dear Drasmuss, Here is my code: with nengo.Network(seed=42) as net:
def classification_accuracy(y_true, y_pred): minibatch_size = 100 #%% ACC vs Timesteps------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ sim.compile(loss={out_p_filt: classification_accuracy}) images = X_valid.reshape((X_valid.shape[0], -1)) ACC = [] for n_steps in trange:
plt.figure(figsize=(8, 4)) |
I tried running a memory profiler on your code, but I wasn't seeing the effect you describe (in fact, |
Dear Drasmuss, Thank you for checking the issue.
x = nengo_dl.Layer(tf.keras.layers.Conv2D(64,3,2))(x,shape_in=(39, 27, 32)) x = nengo_dl.Layer(tf.keras.layers.Conv2D(128,3,2))(x,shape_in=(19, 13, 64)) x = nengo_dl.Layer(tf.keras.layers.Conv2D(256,3,2))(x,shape_in=(9, 6, 128)) output = nengo_dl.Layer(tf.keras.layers.Dense(num_classes))(x) Then call: sim.predict(X_valid) will make full GPU memory. It's seem that the nengo.Probe make trouble?. My X_valid has size of 5400x80x56x1 and nsteps = 40, mini_batchsize = 100. I have GPU with RAM = 24GB (NVIDIA A5000).
Thank you! |
Here I produce two codes for the two errors. |
This is expected. The probe data needs to be stored in memory, so the more probes you have the more memory you will require.
This is also expected. TensorFlow retains information in memory throughout the lifetime of the process, so repeatedly calling |
Dear Drasmuss, Problem 1 is understood. |
Hello,
After traning the nengodl model, I evaluate the accuracy of the model by two ways:
Thank you!
The text was updated successfully, but these errors were encountered: