CoOp
CoOp copied to clipboard
When I set CUDA_VISIBLE_DEVICES="1" not "0",The Code dose not work well.
I found when I set CUDA_VISIBLE_DEVICES="1", The Code will terminal at self.model = CustomCLIP(cfg, classnames, clip_model) self.model.to(self.device).
The to(self.device) function will wait a long time, and will not step over.
I solved it this way. Original code
self.model.to(self.device)
New Code
device_ids = [4,5,6,7]
self.device = device_ids[0]
self.model.to(self.device)