Skip to content

Commit d8b906f

Browse files
author
um1
committed
update polish and compile speed
1 parent 1a88bab commit d8b906f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def weights_init_classifier(m):
2727

2828
class USAM(nn.Module):
2929
#Joint Representation Learning and Keypoint Detection for Cross-view Geo-localization. TIP2022
30-
def __init__(self, kernel_size=3, padding=1, polish=False):
30+
def __init__(self, kernel_size=3, padding=1, polish=True):
3131
super(USAM, self).__init__()
3232

3333
kernel = torch.ones((kernel_size, kernel_size))

train.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ def draw_curve(current_epoch):
535535

536536
if torch.cuda.get_device_capability()[0]>6 and len(opt.gpu_ids)==1 and int(version[0])>1: # should be >=7 and one gpu
537537
torch.set_float32_matmul_precision('high')
538-
torch._dynamo.config.automatic_dynamic_shapes = True
539538
print("Compiling model... The first epoch may be slow, which is expected!")
540539
# https://huggingface.co/docs/diffusers/main/en/optimization/torch2.0
541540
model = torch.compile(model, mode="reduce-overhead", dynamic = True) # pytorch 2.0

0 commit comments

Comments
 (0)