Skip to content

Instantly share code, notes, and snippets.

View dyd1234's full-sized avatar
🎯
Focusing

dyd1234

🎯
Focusing
View GitHub Profile
@dyd1234
dyd1234 / CSPDarknet-53.py
Created July 16, 2024 11:28
Darknet -53 and CSPDarknet-53 SCN with different implementations
import math
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchviz import make_dot
#-------------------------------------------------#
@dyd1234
dyd1234 / multi_repair.py
Created November 5, 2024 02:34
Repair for the rotation and scaling
# --------------------------------------------------------------------
# ... some modules and imports is not showing here
# --------------------------------------------------------------------
# REPAIR implementations
def is_batchnorm(module): #
return isinstance(module, nn.modules.batchnorm._BatchNorm)
# if we need to do with rotation?
# basic implementation