dorarad / gansformer

Generative Adversarial Transformers
MIT License
1.32k stars 149 forks source link

Generation of attention maps problem #48

Open Valquoniam opened 1 year ago

Valquoniam commented 1 year ago

Hey, I've been trying to generate attention maps, but I've been stuck with some errors.

Here is the way I used your codebase after cloning it :

Then I wanted to generate some attention maps : 'python run_network.py --gpus 0 --vis --pretrained-pkl cityscapes-snapshot.pkl --dataset cityscapes --vis-layer-maps'

At first, the code executed correctly, but no file was saved, there was only an empty 'layer_maps' folder. When forcing the parameter 'attention' to be True (visualise.py, l.72), I got this error :

visualize.py", line 170, in vis pallete = np.expand_dims(misc.get_colors(k - 1), axis = [2, 3]) numpy.AxisError: axis 3 is out of bounds for array of dimension 3

I don't know if I'm not using the codebase correctly or not, as a beginner.