Skip to content

Commit

Permalink
Add bias to Classify() (ultralytics#1601)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Dec 4, 2020
1 parent f010147 commit ba48f86
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions models/common.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This file contains modules common to various models

import math

import numpy as np
import torch
import torch.nn as nn
Expand Down Expand Up @@ -244,7 +243,7 @@ class Classify(nn.Module):
def __init__(self, c1, c2, k=1, s=1, p=None, g=1): # ch_in, ch_out, kernel, stride, padding, groups
super(Classify, self).__init__()
self.aap = nn.AdaptiveAvgPool2d(1) # to x(b,c1,1,1)
self.conv = nn.Conv2d(c1, c2, k, s, autopad(k, p), groups=g, bias=False) # to x(b,c2,1,1)
self.conv = nn.Conv2d(c1, c2, k, s, autopad(k, p), groups=g) # to x(b,c2,1,1)
self.flat = Flatten()

def forward(self, x):
Expand Down

0 comments on commit ba48f86

Please sign in to comment.