| CrossregionRelationshipModeling |
Ran ran on a synthesized input |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("872bd82d86c15d7e") 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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np
# INIT_ARGS for CrossregionRelationshipModeling.__init__
INIT_ARGS = {
'in_channels': 8,
'num_classes': 12
}
# ARGS for CrossregionRelationshipModeling.forward
# x: (batch_size, num_classes, in_channels)
# adj_mask: (batch_size, num_classes, num_classes)
ARGS = {
'x': torch.randn(2, 12, 8),
'adj_mask': torch.ones(2, 12, 12)
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, 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)
|
| GATConv |
Ran ran on a synthesized input |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("b89b6e3462f78f9b") 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
# INIT_ARGS for GATConv.__init__
INIT_ARGS = {
'in_feats': 8, # input feature dimension
'out_feats': 6, # output feature dimension per head
'num_heads': 3, # number of attention heads
'dropout': 0.1,
'thred': 0.5, # threshold for adjacency matrix
'residual': True,
'activation': nn.ELU(),
'bias': True
}
# ARGS for GATConv.forward
batch_size = 2
num_nodes = 5
in_feats = INIT_ARGS['in_feats']
# Create adjacency matrix (batch_size, num_nodes, num_nodes)
# Values should be above threshold (0.5) to create connections
adj = torch.rand(batch_size, num_nodes, num_nodes)
adj = (adj + adj.transpose(1, 2)) / 2 # make symmetric
adj = torch.where(adj > 0.3, adj, torch.zeros_like(adj)) # sparse connections
# Create input features (batch_size, num_nodes, in_feats)
x = torch.randn(batch_size, num_nodes, in_feats)
ARGS = {
'adj': adj,
'x': x
}
- 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)
|
| IndividualTemporalModeling |
Ran ran on a synthesized input |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("849c5e640e9421b5") 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, shape (4, 12, 4) 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
import torch.nn as nn
class IndividualTemporalModeling(nn.Module):
def __init__(self, num_classes=12, in_channels=512):
super(IndividualTemporalModeling, self).__init__()
self.num_classes = num_classes
self.in_channels = in_channels
self.bn = nn.BatchNorm1d(num_classes)
self.bn.weight.data.fill_(1)
self.bn.bias.data.zero_()
temporal_cnn_layers = []
for i in range(self.num_classes):
layer = nn.Conv1d(in_channels=self.in_channels, out_channels=self.in_channels, kernel_size=5, padding=2, groups=self.in_channels)
temporal_cnn_layers += [layer]
self.temporal_cnn = nn.ModuleList(temporal_cnn_layers)
self.relu = nn.ReLU(inplace=True)
def forward(self, x, B, T):
BT, N, d = x.shape
x = x.view(B, T, N, d)
v = []
for i, layer in enumerate(self.temporal_cnn):
v.append(layer(x[:, :, i, :].permute(0, 2, 1)).permute(0, 2, 1).unsqueeze(1))
v = torch.cat(v, dim=1)
v = v.view(B, N, T, d).transpose(1, 2).contiguous().view(B * T, N, d)
x = self.relu(self.bn(v))
return x
INIT_ARGS = {
'num_classes': 12,
'in_channels': 4,
}
ARGS = {
'x': torch.randn(4, 12, 4),
'B': 2,
'T': 2,
}
if __name__ == '__main__':
model = IndividualTemporalModeling(**INIT_ARGS)
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
- 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, shape (4, 12, 4) — shape (4, 12, 4) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| LinearBlock |
Ran ran on a synthesized input |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("c315197e49c553ef") 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, shape (2, 5, 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
import torch.nn as nn
import math
class LinearBlock(nn.Module):
def __init__(self, in_features, out_features=None, drop=0.0):
super().__init__()
out_features = out_features or in_features
self.fc = nn.Linear(in_features, out_features)
self.bn = nn.BatchNorm1d(out_features)
self.relu = nn.ReLU(inplace=True)
self.drop = nn.Dropout(drop)
self.fc.weight.data.normal_(0, math.sqrt(2.0 / out_features))
self.bn.weight.data.fill_(1)
self.bn.bias.data.zero_()
def forward(self, x):
x = self.drop(x)
x = self.fc(x).permute(0, 2, 1)
x = self.relu(self.bn(x)).permute(0, 2, 1)
return x
INIT_ARGS = {
'in_features': 4,
'out_features': 3,
'drop': 0.1,
}
ARGS = {
'x': torch.randn(2, 5, 4),
}
if __name__ == '__main__':
block = LinearBlock(**INIT_ARGS)
output = block(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: (2, 5, 3)")
- 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, shape (2, 5, 3) — shape (2, 5, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| LocalRelationshipModeling |
Ran ran on a synthesized input |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("b6dd090add917b37") 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 math
class LinearBlock(nn.Module):
def __init__(self, in_features, out_features=None, drop=0.0):
super().__init__()
out_features = out_features or in_features
self.fc = nn.Linear(in_features, out_features)
self.bn = nn.BatchNorm1d(out_features)
self.relu = nn.ReLU(inplace=True)
self.drop = nn.Dropout(drop)
self.fc.weight.data.normal_(0, math.sqrt(2.0 / out_features))
self.bn.weight.data.fill_(1)
self.bn.bias.data.zero_()
def forward(self, x):
x = self.drop(x)
x = self.fc(x).permute(0, 2, 1)
x = self.relu(self.bn(x)).permute(0, 2, 1)
return x
class LocalRelationshipModeling(nn.Module):
def __init__(self, num_classes=12, in_channels=512, out_channels=512):
super(LocalRelationshipModeling, self).__init__()
self.num_classes = num_classes
self.in_channels = in_channels
self.out_channels = out_channels
self.sub_class = [16, 2, 8, 16]
class_linear_layers = []
for i in range(self.num_classes):
layer = LinearBlock(self.in_channels, self.out_channels)
class_linear_layers += [layer]
self.class_linears = nn.ModuleList(class_linear_layers)
self.up_linear = LinearBlock(self.in_channels, self.out_channels)
self.mid_linear = LinearBlock(self.in_channels, self.out_channels)
self.down1_linear = LinearBlock(self.in_channels, self.out_channels)
self.down2_linear = LinearBlock(self.in_channels, self.out_channels)
self.up_fc = nn.Linear(self.in_channels, self.sub_class[0])
self.mid_fc = nn.Linear(self.in_channels, self.sub_class[1])
self.down1_fc = nn.Linear(self.in_channels, self.sub_class[2])
self.down2_fc = nn.Linear(self.in_channels, self.sub_class[3])
def forward(self, x):
BT, HW, C = x.shape
assert HW == 49
assert C == self.in_channels
x = x.view(BT, 7, 7, self.in_channels)
x_up = x[:, :3, :, :].view(BT, -1, self.in_channels)
x_mid = x[:, 2:5, :, :].view(BT, -1, self.in_channels)
x_down = x[:, 4:, :, :].view(BT, -1, self.in_channels)
x_up = self.up_linear(x_up)
x_mid = self.mid_linear(x_mid)
x_down1 = self.down1_linear(x_down)
x_down2 = self.down2_linear(x_down)
up_pred = self.up_fc(x_up.mean(dim=1))
mid_pred = self.mid_fc(x_mid.mean(dim=1))
down1_pred = self.down1_fc(x_down1.mean(dim=1))
down2_pred = self.down2_fc(x_down2.mean(dim=1))
AU1 = self.class_linears[0](x_up).unsqueeze(1)
AU2 = self.class_linears[1](x_up).unsqueeze(1)
AU4 = self.class_linears[2](x_up).unsqueeze(1)
AU6 = self.class_linears[3](x_mid).unsqueeze(1)
AU7 = self.class_linears[4](x_up).unsqueeze(1)
AU10 = self.class_linears[5](x_down2).unsqueeze(1)
AU12 = self.class_linears[6](x_down1).unsqueeze(1)
AU14 = self.class_linears[7](x_down1).unsqueeze(1)
AU15 = self.class_linears[8](x_down1).unsqueeze(1)
AU17 = self.class_linears[9](x_down2).unsqueeze(1)
AU23 = self.class_linears[10](x_down2).unsqueeze(1)
AU24 = self.class_linears[11](x_down2).unsqueeze(1)
AU_node = [AU1, AU2, AU4, AU6, AU7, AU10, AU12, AU14, AU15, AU17, AU23, AU24]
f_v = torch.cat(AU_node, dim=1)
f_v = f_v.mean(dim=-2)
return (up_pred, mid_pred, down1_pred, down2_pred, f_v)
INIT_ARGS = {
'num_classes': 12,
'in_channels': 4,
'out_channels': 4,
}
ARGS = {
'x': torch.randn(2, 49, 4),
}
if __name__ == '__main__':
model = LocalRelationshipModeling(**INIT_ARGS)
model.eval()
output = model(**ARGS)
print("Output shapes:")
print(f" up_pred: {output[0].shape}")
print(f" mid_pred: {output[1].shape}")
print(f" down1_pred: {output[2].shape}")
print(f" down2_pred: {output[3].shape}")
print(f" f_v: {output[4].shape}")
- 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)
|
| NodeClassifier |
Ran ran on a synthesized input |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("673a8b5c8ea95100") 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, shape (2, 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
import torch.nn as nn
import torch.nn.functional as F
class NodeClassifier(nn.Module):
def __init__(self, class_num=12, in_channels=512):
super(NodeClassifier, self).__init__()
self.num_classes = class_num
self.in_channels = in_channels
self.sc = nn.Parameter(torch.FloatTensor(torch.zeros(self.num_classes, self.in_channels)))
self.relu = nn.ReLU()
nn.init.xavier_uniform_(self.sc)
def forward(self, x):
assert x.shape[1] == self.num_classes
assert x.shape[2] == self.in_channels
b, n, c = x.shape
sc = self.sc
sc = self.relu(sc)
sc = F.normalize(sc, p=2, dim=-1)
cl = F.normalize(x, p=2, dim=-1)
cl = (cl * sc.view(1, n, c)).sum(dim=-1)
return cl
INIT_ARGS = {
'class_num': 5,
'in_channels': 8,
}
ARGS = {
'x': torch.randn(2, 5, 8),
}
if __name__ == '__main__':
model = NodeClassifier(**INIT_ARGS)
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
- 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, shape (2, 5) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| calculate_adjmask_bp4d |
Ran ran; our contract draft was wrong, not the code |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("32c158c8e6e94e62") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family float, shape (2, 1, 12) 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
import torch.nn.functional as F
torch.manual_seed(0)
# Create small prediction tensors for each input
# Each prediction tensor needs to have shape (batch_size, num_classes)
# where num_classes corresponds to the number of bits needed
batch_size = 2
# up_pred: needs to produce 4-bit output, so num_classes >= 2^4 = 16
up_pred = torch.randn(batch_size, 16)
# mid_pred: needs to produce 1-bit output, so num_classes >= 2^1 = 2
mid_pred = torch.randn(batch_size, 2)
# down1_pred: needs to produce 3-bit output, so num_classes >= 2^3 = 8
down1_pred = torch.randn(batch_size, 8)
# down2_pred: needs to produce 4-bit output, so num_classes >= 2^4 = 16
down2_pred = torch.randn(batch_size, 16)
ARGS = {
"up_pred": up_pred,
"mid_pred": mid_pred,
"down1_pred": down1_pred,
"down2_pred": down2_pred,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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, 1, 12) — shape (2, 1, 12) 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
|
| dec2bin |
Ran ran; our contract draft was wrong, not the code |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("e88509f231bb3519") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (4, 4) 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)
# x: a tensor of decimal integers to convert to binary
# bits: number of bits to use in the binary representation
x = torch.tensor([5, 12, 3, 7], dtype=torch.int64)
bits = 4
ARGS = {
"x": x,
"bits": bits,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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, shape (4, 4) — shape (4, 4) 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
|
| get_pred_binary |
Ran ran; our contract draft was wrong, not the code |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("a77e944b799b3d07") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (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
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small prediction tensor with shape (batch_size=2, num_classes=4)
# This will be passed to get_pred_binary as the 'pred' parameter
pred = torch.randn(2, 4)
# Number of bits for binary representation
num_bits = 3
ARGS = {
"pred": pred,
"num_bits": num_bits,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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, shape (2, 3) — shape (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
|
| MDHR |
Not yet run unverified (harvested, no recorded run) |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("48b22121249d3a8e") How it ran |
| MultiscaleFacialDynamic |
Not yet run unverified (harvested, no recorded run) |
CVI-SZU/MDHR/model/model_BP4D.py code served (permissive licence) · get_code("a8a95a66288959b1") How it ran |