Open 972497768 opened 6 months ago
Hi, thank you for submitting the issue.
This issue may be due to not following the installation steps provided in README. Please ensure that you have correctly installed all the necessary dependencies. If you still encounter the issue after installation, please provide more detailed information, such as code snippets and the full error log, so we can help you troubleshoot further.
Can you provide a colab with an example inference on an image.
I have installed the timm package, but I also get this error. The following is my test code. Thank you!
import torch from support_EVAX import eva_x_tiny_patch16, eva_x_small_patch16, eva_x_base_patch16
eva_x_ti_pt = '../pretrained_weights/eva_x_tiny_patch16_merged520k_mim.pt' model = eva_x_tiny_patch16(pretrained=eva_x_ti_pt)
img = torch.rand(10, 3, 224, 224)
y = model(img)
The following is the error information.
D:\ProgramData\anaconda3\envs\py311_torch\Lib\site-packages\torch\functional.py:513: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\TensorShape.cpp:3610.)
return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined]
F:\Project02_pneumonia\Model\model04_EVAX\EVA-X-main\support_EVAX.py:134: FutureWarning: You are using torch.load
with weights_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 for weights_only
will be flipped to True
. 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 via torch.serialization.add_safe_globals
. We recommend you start setting weights_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.
eva_ckpt = checkpoint_filter_fn(torch.load(pretrained, map_location='cpu'),
_IncompatibleKeys(missing_keys=['head.weight', 'head.bias'], unexpected_keys=[])
Traceback (most recent call last):
File "D:\ProgramData\anaconda3\envs\py311_torch\Lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "
When I run the eva_x_tiny_patch16() model, the following error occurs:
'EVA_X' object has no attribute '_pos_embed' File "F:\networks\eva.py", line 106, in forward_features x, rot_pos_embed = self._pos_embed(x) File "F:\networks\eva.py", line 124, in forward x = self.forward_features(x) File "F:\networks\eva.py", line 201, in
summary(net, (3, 224,224))