Skip to content
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

Testing examples, road_following #136

Open
MaxKru opened this issue Oct 2, 2022 · 4 comments
Open

Testing examples, road_following #136

MaxKru opened this issue Oct 2, 2022 · 4 comments

Comments

@MaxKru
Copy link

MaxKru commented Oct 2, 2022

Hello,
currently im trying out the given examples, until now everything worked out fine,
now when i try to go through the road following example i get the following error message:


OSError                                   Traceback (most recent call last)
<ipython-input-2-85080642f8f2> in <module>
----> 1 import torch
      2 import torchvision
      3 
      4 CATEGORIES = ['apex']
      5 

/usr/local/lib/python3.6/dist-packages/torch/__init__.py in <module>
    186     # See Note [Global dependencies]
    187     if USE_GLOBAL_DEPS:
--> 188         _load_global_deps()
    189     from torch._C import *
    190 

/usr/local/lib/python3.6/dist-packages/torch/__init__.py in _load_global_deps()
    139     lib_path = os.path.join(os.path.dirname(here), 'lib', lib_name)
    140 
--> 141     ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
    142 
    143 

/usr/lib/python3.6/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    346 
    347         if handle is None:
--> 348             self._handle = _dlopen(self._name, mode)
    349         else:
    350             self._handle = handle

OSError: /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

when trying to run following code:

import torch
import torchvision

CATEGORIES = ['apex']

device = torch.device('cuda')
model = torchvision.models.resnet18(pretrained=False)
model.fc = torch.nn.Linear(512, 2 * len(CATEGORIES))
model = model.cuda().eval().half()

i already tried restarting, resaving the model i trained and this command
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1

how can i solve this error message?

@ammarhaziqmh
Copy link

Have you manage to get a solution? I am having the same issue.

@arickchan
Copy link

same issue here....

@ammarhaziqmh
Copy link

same issue here....

Try importing cv2 before import torch and torchvision as it helped me.

import cv2
import torch
import torchvision

CATEGORIES = ['apex']

device = torch.device('cuda')
model = torchvision.models.resnet18(pretrained=False)
model.fc = torch.nn.Linear(512, 2 * len(CATEGORIES))
model = model.cuda().eval().half()

@didlawowo
Copy link

i have this error after adding cv2
AttributeError: module 'torch' has no attribute '_six'

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

No branches or pull requests

4 participants