Otherwise, this modified version of your code should do the work :
def visfeaturemap(feature_maps, filename='default.png', save=False):
    # plot all 128 maps in two 8x8 squares
    square = 8
    for ix in range(square):
        for jx in range(square):
            # plot features_0 on the left
            # specify subplot and turn off axis
            ax = plt.subplot(square, 1+2*square, 1 + jx + (1+2*square)*ix)
            ax.set_xticks([])
            ax.set_yticks([])
            # plot filter channel in grayscale
            plt.imshow(feature_maps[0, ix].cpu().numpy())

            # plot features_1 on the right
            # specify subplot and turn off axis
            ax = plt.subplot(square, 1+2*square, 1 + jx + (1+2*square)*ix + (1+square))
            ax.set_xticks([])
            ax.set_yticks([])
            # plot filter channel in grayscale
            plt.imshow(feature_maps[1, ix].cpu().numpy())

    plt.title(filename)
    plt.show()

    if save:
        plt.savefig(filename)