Unverified 提交 ba48f867 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Add bias to Classify() (#1601)

上级 f0101475
# 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):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论