增加跟踪的一些逻辑代码
This commit is contained in:
@ -891,7 +891,7 @@ class AutoShape(nn.Module):
|
||||
x = np.ascontiguousarray(np.array(x).transpose((0, 3, 1, 2))) # stack and BHWC to BCHW
|
||||
x = torch.from_numpy(x).to(p.device).type_as(p) / 255 # uint8 to fp16/32
|
||||
|
||||
with amp.autocast(autocast):
|
||||
with torch.amp.autocast(device_type='cuda', enabled=autocast):
|
||||
# Inference
|
||||
with dt[1]:
|
||||
y = self.model(x, augment=augment) # forward
|
||||
|
Reference in New Issue
Block a user