Я пытаюсь построить сетку, но существует сообщение об ошибке -
(feature_vis.py:27730): Gdk-WARNING **: 03:23:47.745: Native Windows wider or taller than 32767 pixels are not supported
Segmentation fault (core dumped)
model_weights = './Mutual-Channel-Loss-master/model_info_best.pth'
model_features = './Mutual-Channel-Loss-master/features_best_new.pth'
weights = torch.load(model_weights, map_location = torch.device('cpu'))
features = torch.load(model_features, map_location = torch.device('cpu'))
activations = features['features']
feature_map = activations[0][0][3]
# feature_maps = np.load(path, allow_pickle = True)
# test = feature_maps[0][0][0]
fig = plt.figure(figsize = (300, 500))
grid = ImageGrid(fig, 111, # similar to subplot(111)
nrows_ncols=(20, 30), # creates 2x2 grid of axes
axes_pad=0.1, # pad between axes in inch.
)
for ax, im in zip(grid, feature_map):
# Iterating over the grid returns the Axes.
im = im.to('cpu').numpy()
ax.imshow(im, cmap = 'gray')
plt.savefig('test.png', ppi = 300)
Как мне это исправить / отладить?
Я использую python 3.6.9 и на ubuntu 18.04