-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeprecationWarning and AttributeError for np.int in get_rect function #222
Comments
I was able to get it to work by changing the cell above it from np.int to just int, I have no idea if this is the correct or best solution but I got it to work for me.
and I got a similar deprecation error later when running this command
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I encountered a problem while running the get_rect function in the project. Here are the details:
:2: FutureWarning: You are using
torch.load
withweights_only=False
(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value forweights_only
will be flipped toTrue
. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user viatorch.serialization.add_safe_globals
. We recommend you start settingweights_only=True
for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.checkpoint = torch.load('checkpoint_iter_370000.pth', map_location='cpu')
/content/pifuhd/sample_images/Untitled-1.png
AttributeError Traceback (most recent call last)
in <cell line: 5>()
3 load_state(net, checkpoint)
4 print(image_path)
----> 5 get_rect(net.cuda(), [image_path], 512)
1 frames
/usr/local/lib/python3.10/dist-packages/numpy/init.py in getattr(attr)
322
323 if attr in former_attrs:
--> 324 raise AttributeError(former_attrs[attr])
325
326 if attr == 'testing':
AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtinint
. To avoid this error in existing code, useint
by itself. Doing this will not modify any behavior and is safe. When replacingnp.int
, you may wish to use e.g.np.int64
ornp.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
.
please help me
The text was updated successfully, but these errors were encountered: