code stringlengths 3 6.57k |
|---|
make_extra(x) |
nn.Conv2d(out_channels, self.num_priors * self.mask_dim, kernel_size=3, padding=1) |
forward(self, x) |
tuple (bbox_coords, class_confs, mask_output, prior_boxes) |
x.size(2) |
x.size(3) |
src.upfeature(x) |
design (c) |
src.block(x) |
src.conv(x) |
src.bn(b) |
F.relu(b) |
src.bbox_extra(x) |
src.conf_extra(x) |
src.mask_extra(x) |
src.bbox_layer(bbox_x) |
permute(0, 2, 3, 1) |
contiguous() |
view(x.size(0) |
src.conf_layer(conf_x) |
permute(0, 2, 3, 1) |
contiguous() |
view(x.size(0) |
src.mask_layer(mask_x) |
permute(0, 2, 3, 1) |
contiguous() |
view(x.size(0) |
torch.zeros(x.size(0) |
bbox.size(1) |
src.score_layer(x) |
permute(0, 2, 3, 1) |
contiguous() |
view(x.size(0) |
src.inst_layer(x) |
permute(0, 2, 3, 1) |
contiguous() |
view(x.size(0) |
torch.sigmoid(bbox[:, :, :2]) |
torch.sigmoid(mask) |
cfg.mask_proto_coeff_activation(mask) |
src.gate_layer(x) |
permute(0, 2, 3, 1) |
contiguous() |
view(x.size(0) |
torch.sigmoid(gate) |
F.pad(mask, (self.index * self.mask_dim, (self.num_heads - self.index - 1) |
self.make_priors(conv_h, conv_w, x.device) |
make_priors(self, conv_h, conv_w, device) |
where (x,y) |
timer.env('makepriors') |
important (it has to sync up with the convout) |
product(range(conv_h) |
range(conv_w) |
sqrt(ar) |
torch.Tensor(prior_data, device=device) |
view(-1, 4) |
detach() |
self.priors.to(device) |
FPN(ScriptModuleWrapper) |
Parameters (in cfg.fpn) |
num_features (int) |
interpolation_mode (str) |
num_downsample (int) |
in_channels (list) |
__init__(self, in_channels) |
super() |
__init__() |
nn.Conv2d(x, cfg.fpn.num_features, kernel_size=1) |
reversed(in_channels) |
nn.Conv2d(cfg.fpn.num_features, cfg.fpn.num_features, kernel_size=3, padding=padding) |
nn.Conv2d(cfg.fpn.num_features, cfg.fpn.num_features, kernel_size=3, padding=1, stride=2) |
range(cfg.fpn.num_downsample) |
forward(self, convouts:List[torch.Tensor]) |
convouts (list) |
torch.zeros(1, device=convouts[0].device) |
range(len(convouts) |
out.append(x) |
len(convouts) |
len(convouts) |
size() |
F.interpolate(x, size=(h, w) |
lat_layer(convouts[j]) |
len(convouts) |
pred_layer(out[j]) |
F.relu(out[j], inplace=True) |
len(out) |
out.append(downsample_layer(out[-1]) |
range(self.num_downsample) |
out.append(out[-1][:, :, ::2, ::2]) |
out.append(nn.functional.max_pool2d(out[-1], 1, stride=2) |
range(len(out) |
F.relu(out[idx + cur_idx], inplace=False) |
FastMaskIoUNet(ScriptModuleWrapper) |
__init__(self) |
super() |
__init__() |
make_net(input_channels, cfg.maskiou_net + last_layer, include_last_relu=True) |
forward(self, x) |
self.maskiou_net(x) |
F.max_pool2d(x, kernel_size=x.size() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.