This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
from collections import OrderedDict | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from torchviz import make_dot | |
#-------------------------------------------------# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------- | |
# ... 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 |