Skip to content

small fix #4

Description

@hanklin3

trans_fun = "basic_transform"

class ResStage_basetransform(nn.Module):
"""Stage of ResNet."""

def __init__(self, w_in, w_out, stride, d, w_b=None, num_gs=1):
    super(ResStage_basetransform, self).__init__()      # <------------------------
    for i in range(d):
        b_stride = stride if i == 0 else 1
        b_w_in = w_in if i == 0 else w_out
        trans_fun = get_trans_fun("basic_transform")      # <------------------------
        res_block = ResBlock(b_w_in, w_out, b_stride, trans_fun, w_b, num_gs)
        self.add_module("b{}".format(i + 1), res_block)

def forward(self, x):
    for block in self.children():
        x = block(x)
    return x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions