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

Performance and small fixes #655

Merged
merged 14 commits into from
Oct 27, 2023
3 changes: 3 additions & 0 deletions bindsnet/analysis/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ def plot_weights(
fig.tight_layout()
else:
im.set_data(local_weights)
wmin = weights.min().item()
wmax = weights.max().item()
im.set_clim(wmin, wmax)

return im

Expand Down
3 changes: 2 additions & 1 deletion bindsnet/environment/environment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from abc import ABC, abstractmethod
from typing import Any, Dict, Tuple

import ale_py
import gymnasium as gym
import numpy as np
import torch
Expand Down Expand Up @@ -88,7 +89,7 @@ def __init__(
2D inputs.
"""
self.name = name
self.env = gym.make(name, render_mode=render_mode)
self.env = gym.make(env_id=name) # , render_mode=render_mode)
self.action_space = self.env.action_space

self.encoder = encoder
Expand Down
Loading