lucent icon indicating copy to clipboard operation
lucent copied to clipboard

Convert numpy.int64 to python native int in 'random_scale'

Open smarginatura opened this issue 2 years ago • 0 comments

This pull request addresses a TypeError triggered by the random_scale function in transform.py

TypeError

The error is encountered when running certain Colab notebooks based on lucent ( (eg:neuron_interaction) with PyTorch 2.1.

The issue is resolved by converting the scale_shape local variable from a list of numpy.int64 to native Python int, ensuring compatibility with nn.Upsample.

smarginatura avatar Dec 15 '23 00:12 smarginatura