im trying to run the following code
import matplotlib as plt
def plot_filters(layer, x, y):
filters = layer.get_weights()
fig = plt.figure.Figure()
for j in range(len(filters)):
ax = fig.add_subplot(y, x, j+1)
ax.matshow(filters[j][0], cmap = plt.cm.binary)
plt.xticks(np.array([]))
plt.yticks(np.array([]))
plt.tight_layout()
return plt
plot_filters(model.layers[0], 8, 4)
when running this I am receiving 'module' object is not callable and it is referencing the plt.tight_layout() line.
Cant figure out how to call this. It is present in the matplotlib package.
Any help will be appreciated!
Thanks
fig=plt.figure()it gives me the same error but instead it references thefig=plt.figure()line,ValueError: too many values to unpack (expected 2). Can you possibly help me with that?