| FeatureFusionBlock |
Ran ran on a synthesized input · constructed an object; no result was computed |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("474eb4816b8052da") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, FeatureFusionBlock: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
class FeatureFusionBlock(nn.Module):
"""Transformer encoder fusion block with a learnable CLS token.
Processes seed-point features (128 tokens) + 1 CLS token through
a Transformer encoder for global and per-point feature extraction.
"""
def __init__(self, d_model=512, nhead=8, num_layers=6, dim_feedforward=None, dropout=0.1):
super().__init__()
if dim_feedforward is None:
dim_feedforward = 4 * d_model
self.cls_token = nn.Parameter(torch.zeros(1, 1, d_model))
nn.init.trunc_normal_(self.cls_token, std=0.02)
self.pos_proj = nn.Sequential(nn.Linear(3, d_model), nn.LayerNorm(d_model))
encoder_layer = nn.TransformerEncoderLayer(d_model=d_model, nhead=nhead, dim_feedforward=dim_feedforward, dropout=dropout, batch_first=True)
self.encoder = nn.TransformerEncoder(encoder_layer, num_layers=num_layers)
self.norm = nn.LayerNorm(d_model)
def forward(self, point_features, seed_xyz=None):
"""
Args:
point_features: (B, S, d_model) seed-point features.
seed_xyz: optional (B, S, 3) seed-point coordinates for positional encoding.
Returns:
cls_feature: (B, d_model) global feature.
point_features: (B, S, d_model) per-point features.
"""
if seed_xyz is not None:
point_features = point_features + self.pos_proj(seed_xyz)
batch_size = point_features.shape[0]
cls_tokens = self.cls_token.expand(batch_size, -1, -1)
tokens = torch.cat([cls_tokens, point_features], dim=1)
tokens = self.encoder(tokens)
tokens = self.norm(tokens)
cls_feature = tokens[:, 0, :]
point_features = tokens[:, 1:, :]
return (cls_feature, point_features)
ARGS = {
"d_model": 64,
"nhead": 4,
"num_layers": 2,
"dim_feedforward": 256,
"dropout": 0.1,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type FeatureFusionBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FeatureFusionBlock output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| JointTypeDecoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("483e652824478152") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, JointTypeDecoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# The JointTypeDecoder.__init__ takes in_dim parameter
# The forward method takes aggregated_features tensor
# aggregated_features should have shape (batch, in_dim) to pass through the MLP
# Create a small aggregated_features tensor
batch_size = 2
in_dim = 512
aggregated_features = torch.randn(batch_size, in_dim)
ARGS = {
"in_dim": 512,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type JointTypeDecoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a JointTypeDecoder output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MLDM |
Ran ran on a synthesized input |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("eb00ee7e20d6b31d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
import torch.nn.functional as F
class MLDM(nn.Module):
"""Multi-Layer Dueling Module for cross-modal RGB + point cloud fusion.
Each ResNet layer is processed into a global descriptor. Point cloud global
features participate in the weight computation (dueling mechanism) so that
the two modalities compete and complement each other when determining
layer importance.
Args:
resnet_channels: list of channel counts for each ResNet stage.
pc_feat_dim: point cloud per-seed-point feature dimension.
rgb_feat_dim: intermediate RGB feature dimension per layer.
d_model: output fused feature dimension (rgb_feat_dim + pc_feat_dim).
"""
def __init__(self, resnet_channels, pc_feat_dim, rgb_feat_dim=256, d_model=512):
super().__init__()
self.num_layers = len(resnet_channels)
self.rgb_feat_dim = rgb_feat_dim
self.layer_processors = nn.ModuleList([nn.Sequential(nn.Conv2d(ch, rgb_feat_dim, kernel_size=1, bias=False), nn.BatchNorm2d(rgb_feat_dim), nn.ReLU(inplace=True)) for ch in resnet_channels])
self.pc_proj = nn.Sequential(nn.Linear(pc_feat_dim, rgb_feat_dim), nn.ReLU(inplace=True))
self.weight_mlp = nn.Sequential(nn.Linear(rgb_feat_dim * self.num_layers + rgb_feat_dim, 256), nn.ReLU(inplace=True), nn.Linear(256, self.num_layers))
self.fusion_proj = nn.Sequential(nn.Linear(rgb_feat_dim + pc_feat_dim, d_model), nn.LayerNorm(d_model), nn.ReLU(inplace=True))
def forward(self, rgb_features, pc_per_point):
"""
Args:
rgb_features: list of tensors from ResNet stages.
pc_per_point: (B, S, C_pc) per-seed-point features from PointNet++.
Returns:
fused: (B, S, d_model) fused multi-modal features.
"""
B, S, _ = pc_per_point.shape
layer_feats = []
for proc, feat in zip(self.layer_processors, rgb_features):
processed = proc(feat)
pooled = F.adaptive_avg_pool2d(processed, 1).flatten(1)
layer_feats.append(pooled)
layer_stack = torch.stack(layer_feats, dim=1)
pc_global = pc_per_point.max(dim=1)[0]
pc_global_proj = self.pc_proj(pc_global)
rgb_concat = torch.cat(layer_feats, dim=-1)
weight_input = torch.cat([rgb_concat, pc_global_proj], dim=-1)
weights = F.softmax(self.weight_mlp(weight_input), dim=-1)
rgb_global = (layer_stack * weights.unsqueeze(-1)).sum(dim=1)
rgb_expanded = rgb_global.unsqueeze(1).expand(-1, S, -1)
fused = torch.cat([rgb_expanded, pc_per_point], dim=-1)
return self.fusion_proj(fused)
INIT_ARGS = {
'resnet_channels': [8, 16],
'pc_feat_dim': 4,
'rgb_feat_dim': 6,
'd_model': 10,
}
ARGS = {
'rgb_features': [
torch.randn(2, 8, 5, 5),
torch.randn(2, 16, 3, 3),
],
'pc_per_point': torch.randn(2, 7, 4),
}
if __name__ == '__main__':
model = MLDM(**INIT_ARGS)
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: (2, 7, 10)")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| MovabilityDecoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("6a155f8b4cb6ef1e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MovabilityDecoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# The forward method takes point_features and passes it through an MLP
# The MLP expects input of shape (B, S, in_dim) where in_dim defaults to 512
# Output shape is (B, S, 1)
# Create a tiny point_features tensor: batch_size=2, num_points=3, feature_dim=512
point_features = torch.randn(2, 3, 512)
# The __init__ parameter is in_dim which defaults to 512
# We can use the default or specify it explicitly
ARGS = {
"in_dim": 512,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type MovabilityDecoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MovabilityDecoder output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| PerceptionScoreDecoder |
Ran ran on a synthesized input |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("f4f15d43acc68ec9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
class PerceptionScoreDecoder(nn.Module):
"""Predict perception quality score in [0, 1]."""
def __init__(self, in_dim=512):
super().__init__()
self.mlp = nn.Sequential(nn.Linear(in_dim, 128), nn.LayerNorm(128), nn.ReLU(inplace=True), nn.Linear(128, 64), nn.LayerNorm(64), nn.ReLU(inplace=True), nn.Linear(64, 1), nn.Sigmoid())
def forward(self, cls_feature):
return self.mlp(cls_feature)
INIT_ARGS = {
'in_dim': 4
}
ARGS = {
'cls_feature': torch.randn(2, 4)
}
if __name__ == '__main__':
model = PerceptionScoreDecoder(**INIT_ARGS)
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Output range: [{output.min().item():.4f}, {output.max().item():.4f}]")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| PointNetFeaturePropagation |
Ran ran on a synthesized input |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("ac744ada43a50a0e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
def index_points(points, idx):
"""Gather points by index.
Args:
points: (B, N, C)
idx: (B, S) or (B, S, K)
Returns:
indexed: (B, S, C) or (B, S, K, C)
"""
device = points.device
B = points.shape[0]
view_shape = list(idx.shape)
view_shape[1:] = [1] * (len(view_shape) - 1)
repeat_shape = list(idx.shape)
repeat_shape[0] = 1
batch_indices = torch.arange(B, dtype=torch.long, device=device).view(view_shape).repeat(repeat_shape)
return points[batch_indices, idx, :]
def square_distance(src, dst):
"""Squared Euclidean distance between every pair of points.
Args:
src: (B, N, C)
dst: (B, M, C)
Returns:
dist: (B, N, M)
"""
return torch.cdist(src, dst, p=2.0).pow(2)
class PointNetFeaturePropagation(nn.Module):
"""Feature Propagation module: inverse-distance interpolation + MLP."""
def __init__(self, in_channel, mlp_channels):
super().__init__()
layers = []
last_channel = in_channel
for out_channel in mlp_channels:
layers.append(nn.Conv1d(last_channel, out_channel, 1, bias=False))
layers.append(nn.BatchNorm1d(out_channel))
layers.append(nn.ReLU(inplace=True))
last_channel = out_channel
self.mlp = nn.Sequential(*layers)
def forward(self, xyz1, xyz2, features1, features2):
"""Propagate features from xyz2 (fewer points) to xyz1 (more points).
Args:
xyz1: (B, N, 3) target points (more points)
xyz2: (B, S, 3) source points (fewer points)
features1: (B, N, C1) skip-connection features at target level
features2: (B, S, C2) features to propagate from source level
Returns:
new_features: (B, N, C_out)
"""
B, N, _ = xyz1.shape
_, S, _ = xyz2.shape
if S == 1:
interpolated = features2.expand(-1, N, -1)
else:
dists = square_distance(xyz1, xyz2)
dists, idx = dists.topk(3, dim=-1, largest=False)
dist_recip = 1.0 / (dists + 1e-08)
weight = dist_recip / dist_recip.sum(dim=-1, keepdim=True)
interpolated = torch.sum(index_points(features2, idx) * weight.unsqueeze(-1), dim=2)
if features1 is not None:
new_features = torch.cat([features1, interpolated], dim=-1)
else:
new_features = interpolated
new_features = new_features.permute(0, 2, 1)
new_features = self.mlp(new_features)
new_features = new_features.permute(0, 2, 1)
return new_features
INIT_ARGS = {
'in_channel': 8,
'mlp_channels': [16, 12]
}
ARGS = {
'xyz1': torch.randn(2, 12, 3),
'xyz2': torch.randn(2, 5, 3),
'features1': torch.randn(2, 12, 4),
'features2': torch.randn(2, 5, 4)
}
if __name__ == '__main__':
model = PointNetFeaturePropagation(**INIT_ARGS)
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: (2, 12, 12)")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| PointNetSetAbstraction |
Ran ran on a synthesized input · constructed an object; no result was computed |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("bf8d6ab94618b20c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, PointNetSetAbstraction: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
ARGS = {
"npoint": 2,
"nsample": 3,
"in_channel": 5,
"mlp_channels": [8, 16]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type PointNetSetAbstraction — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PointNetSetAbstraction output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| ResNetBackbone |
Ran ran on a synthesized input |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("d452cf2b41931a14") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torchvision.models import resnet18
class ResNetBackbone(nn.Module):
"""ResNet18 backbone that extracts multi-layer features.
Returns features from 5 stages of ResNet18:
- layer0 (conv1+bn1+relu+maxpool): (B, 64, H/4, W/4)
- layer1: (B, 64, H/4, W/4)
- layer2: (B, 128, H/8, W/8)
- layer3: (B, 256, H/16, W/16)
- layer4: (B, 512, H/32, W/32)
"""
def __init__(self, pretrained=True):
super().__init__()
if pretrained:
try:
from torchvision.models import ResNet18_Weights
backbone = resnet18(weights=ResNet18_Weights.DEFAULT)
except:
backbone = resnet18(weights=None)
else:
backbone = resnet18(weights=None)
self.layer0 = nn.Sequential(backbone.conv1, backbone.bn1, backbone.relu, backbone.maxpool)
self.layer1 = backbone.layer1
self.layer2 = backbone.layer2
self.layer3 = backbone.layer3
self.layer4 = backbone.layer4
def forward(self, x):
"""
Args:
x: (B, 3, H, W) RGB image tensor.
Returns:
List of 5 feature tensors from each stage.
"""
f0 = self.layer0(x)
f1 = self.layer1(f0)
f2 = self.layer2(f1)
f3 = self.layer3(f2)
f4 = self.layer4(f3)
return [f0, f1, f2, f3, f4]
INIT_ARGS = {
'pretrained': False
}
ARGS = {
'x': torch.randn(2, 3, 64, 64)
}
if __name__ == '__main__':
model = ResNetBackbone(**INIT_ARGS)
output = model(**ARGS)
print(f"Number of feature maps: {len(output)}")
for i, feat in enumerate(output):
print(f"Feature {i} shape: {feat.shape}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| VotingModule |
Ran ran on a synthesized input |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("12732a2ba582423d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
import torch.nn.functional as F
class VotingModule(nn.Module):
"""Per-seed-point voting for joint parameters.
Each seed point independently votes for the joint axis position,
direction, and state. Final predictions are the mean of all votes.
No hard thresholding is used, avoiding gradient issues during training.
"""
def __init__(self, in_dim=512, hidden_dim=256):
super().__init__()
self.feat_offset = nn.Sequential(nn.Linear(in_dim, hidden_dim), nn.ReLU(inplace=True), nn.Linear(hidden_dim, in_dim))
self.vote_h = nn.Sequential(nn.Linear(in_dim, hidden_dim), nn.ReLU(inplace=True), nn.Linear(hidden_dim, 3))
self.vote_u = nn.Sequential(nn.Linear(in_dim, hidden_dim), nn.ReLU(inplace=True), nn.Linear(hidden_dim, 3))
self.vote_v = nn.Sequential(nn.Linear(in_dim, hidden_dim), nn.ReLU(inplace=True), nn.Linear(hidden_dim, 1))
def forward(self, seed_xyz, seed_features):
"""
Args:
seed_xyz: (B, S, 3) seed point coordinates.
seed_features: (B, S, C) seed point features.
Returns:
h: (B, 3) joint axis position (mean of per-point votes).
u: (B, 3) joint axis direction (normalized mean vote).
v: (B, 1) joint state.
agg_features: (B, C) aggregated features for downstream.
"""
offsets = self.feat_offset(seed_features)
voted_features = seed_features + offsets
h_offsets = self.vote_h(voted_features)
h_votes = seed_xyz + h_offsets
u_votes = self.vote_u(voted_features)
v_votes = self.vote_v(voted_features)
h = h_votes.mean(dim=1)
u = F.normalize(u_votes.mean(dim=1), dim=-1)
v = v_votes.mean(dim=1)
agg_features = voted_features.mean(dim=1)
return (h, u, v, agg_features)
INIT_ARGS = {
'in_dim': 4,
'hidden_dim': 8,
}
ARGS = {
'seed_xyz': torch.randn(2, 5, 3),
'seed_features': torch.randn(2, 5, 4),
}
if __name__ == '__main__':
module = VotingModule(**INIT_ARGS)
h, u, v, agg_features = module(**ARGS)
print(f"h shape: {h.shape}, expected: (2, 3)")
print(f"u shape: {u.shape}, expected: (2, 3)")
print(f"v shape: {v.shape}, expected: (2, 1)")
print(f"agg_features shape: {agg_features.shape}, expected: (2, 4)")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| farthest_point_sample |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("9735279d0bc3aa74") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Create a small batch of point clouds
# xyz shape: (B, N, 3) where B=batch size, N=number of points, 3=coordinates
B = 2
N = 4
xyz = torch.randn(B, N, 3, dtype=torch.float32)
# Number of points to sample
npoint = 2
ARGS = {
"xyz": xyz,
"npoint": npoint,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family int, shape (2, 2) — shape (2, 2) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| index_points |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("947dcee3f577f6cd") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Create small tensors for the function
B = 2 # batch size
N = 5 # number of points
C = 3 # number of channels
S = 4 # number of sampled points
K = 2 # number of neighbors
# points: (B, N, C) - batch of point clouds
points = torch.randn(B, N, C)
# idx: (B, S, K) - indices to gather
idx = torch.randint(0, N, (B, S, K))
ARGS = {
"points": points,
"idx": idx,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 4, dtype family float, shape (2, 4, 2, 3) — shape (2, 4, 2, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| square_distance |
Ran ran; our contract draft was wrong, not the code |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("24896468cac00905") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Create small tensors with distinct dimensions
# src: (B=2, N=3, C=4)
# dst: (B=2, M=5, C=4)
src = torch.randn(2, 3, 4)
dst = torch.randn(2, 5, 4)
ARGS = {
"src": src,
"dst": dst,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MFFP |
Not yet run unverified (harvested, no recorded run) |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("0cda0dd251868fc7") How it ran |
| PointNet2Backbone |
Not yet run unverified (harvested, no recorded run) |
robhlzeng/MARS/mars/models/mffp.py code served (permissive licence) · get_code("5975f43c484850be") How it ran |