add sofia models

This commit is contained in:
pikaliov
2026-04-29 08:04:33 +03:00
parent a27b5a7357
commit 0d8c82acc3
23 changed files with 4448 additions and 44 deletions

11
scripts/test_dcn.py Normal file
View File

@@ -0,0 +1,11 @@
import torch
from DCNv4 import DCNv4
dcn = DCNv4(channels=64, group=4).cuda().eval()
print('--- 50 forward calls, no_grad ---')
with torch.no_grad():
for s in range(50):
x = torch.randn(8, 4096, 64, device='cuda')
_ = dcn(x)
if s % 10 == 0:
print(f'{s}: {torch.cuda.memory_allocated() / 1e6:.1f} MB')