code
stringlengths
3
6.57k
self.mlp1(x)
x.sparse()
self.conv1(y)
self.pool(y)
self.conv2(y1)
self.pool(y)
self.conv3(y2)
self.pool(y)
self.conv4(y3)
self.pool(y)
y1.slice(x)
y2.slice(x)
y3.slice(x)
y4.slice(x)
ME.cat(x1, x2, x3, x4)
self.conv5(x.sparse()
self.global_max_pool(y)
self.global_avg_pool(y)
self.final(ME.cat(x1, x2)
GlobalMaxAvgPool(torch.nn.Module)
__init__(self)
torch.nn.Module.__init__(self)
ME.MinkowskiGlobalMaxPooling()
ME.MinkowskiGlobalAvgPooling()
forward(self, tensor)
self.global_max_pool(tensor)
self.global_avg_pool(tensor)
ME.cat(x, y)
MinkowskiSplatFCNN(MinkowskiFCNN)
forward(self, x: ME.TensorField)
self.mlp1(x)
x.splat()
self.conv1(y)
self.pool(y)
self.conv2(y1)
self.pool(y)
self.conv3(y2)
self.pool(y)
self.conv4(y3)
self.pool(y)
y1.interpolate(x)
y2.interpolate(x)
y3.interpolate(x)
y4.interpolate(x)
ME.cat(x1, x2, x3, x4)
self.conv5(x.sparse()
self.global_max_pool(y)
self.global_avg_pool(y)
self.final(ME.cat(x1, x2)
create_input_batch(batch, is_minknet, device="cuda", quantization_size=0.05)
permute(0, 2, 1)
to(device)
__init__(self, translation)
__call__(self, coords)
np.random.uniform(low=-self.trans, high=self.trans, size=[1, 3])
make_data_loader(phase, is_minknet, config)
CoordinateTransformation(trans=config.translation)
CoordinateTranslation(config.test_translation)
test(net, device, config, phase="val")
isinstance(net, ME.MinkowskiNetwork)
net.eval()
torch.no_grad()
net(input)
torch.argmax(logit, 1)
labels.append(batch["labels"].cpu()
numpy()
preds.append(pred.cpu()
numpy()
torch.cuda.empty_cache()
metrics.accuracy_score(np.concatenate(labels)
np.concatenate(preds)
criterion(pred, labels, smoothing=True)
labels.contiguous()
view(-1)
pred.size(1)
torch.zeros_like(pred)
scatter(1, labels.view(-1, 1)
F.log_softmax(pred, dim=1)
sum(dim=1)
mean()
F.cross_entropy(pred, labels, reduction="mean")
train(net, device, config)
isinstance(net, ME.MinkowskiNetwork)
net.parameters()
print(optimizer)
print(scheduler)
iter(make_data_loader("train", is_minknet, config)
net.train()
range(config.max_steps)
optimizer.zero_grad()
train_iter.next()
iter(make_data_loader("train", is_minknet, config)
train_iter.next()
net(input)
criterion(logit, data_dict["labels"].to(device)
loss.backward()
optimizer.step()
scheduler.step()
torch.cuda.empty_cache()
print(f"Iter: {i}, Loss: {loss.item()