Skip to content

Commit

Permalink
Update vanillanet.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HantingChen authored Jun 7, 2023
1 parent b6b9bf7 commit a0e3043
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/vanillanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from timm.models.layers import weight_init, DropPath
from timm.models.registry import register_model


# Series informed activation function. Implemented by conv.
class activation(nn.ReLU):
def __init__(self, dim, act_num=3, deploy=False):
super(activation, self).__init__()
Expand Down Expand Up @@ -84,7 +84,10 @@ def forward(self, x):
x = self.conv(x)
else:
x = self.conv1(x)

# We use leakyrelu to implement the deep training technique.
x = torch.nn.functional.leaky_relu(x,self.act_learn)

x = self.conv2(x)

x = self.pool(x)
Expand Down

0 comments on commit a0e3043

Please sign in to comment.