Skip to content

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

Merged
greentfrapp merged 1 commit intogreentfrapp:devfrom
smarginatura:dev2
May 19, 2024
Merged

Convert numpy.int64 to python native int in 'random_scale'#48
greentfrapp merged 1 commit intogreentfrapp:devfrom
smarginatura:dev2

Conversation

@smarginatura
Copy link

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.

@greentfrapp
Copy link
Owner

SFLR but thanks for the update @smarginatura !

@greentfrapp greentfrapp merged commit 33f3b36 into greentfrapp:dev May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants