Browse Source

Add bias to Classify() (#1601)

5.0
Glenn Jocher GitHub 3 years ago
parent
commit
ba48f867ea
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      models/common.py

+ 1
- 2
models/common.py View File

@@ -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
@@ -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):

Loading…
Cancel
Save