| BinaryConv2d |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("fb3430508c0a3333") 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 4, 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 numpy as np
# INIT_ARGS for BinaryConv2d.__init__
INIT_ARGS = {
'in_channels': 8,
'out_channels': 8, # Not used in forward (uses in_channels for groups conv)
'kernel_size': 3,
'stride': 1,
'padding': 1,
'bias': False,
'groups': 8 # groups=in_channels for depthwise conv
}
# ARGS for BinaryConv2d.forward
# Input tensor: batch=2, channels=8 (must match in_channels), height=5, width=7
ARGS = {
'x': torch.randn(2, 8, 5, 7)
}
- 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 4, 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)
|
| BinaryConv2d_Down |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("d52650d854407102") 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 4, 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 LearnableBias(nn.Module):
def __init__(self, out_chn):
super(LearnableBias, self).__init__()
self.bias = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True)
def forward(self, x):
out = x + self.bias.expand_as(x)
return out
class ReDistribution(nn.Module):
def __init__(self, out_chn):
super(ReDistribution, self).__init__()
self.b = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True)
self.k = nn.Parameter(torch.ones(1, out_chn, 1, 1), requires_grad=True)
def forward(self, x):
out = x * self.k.expand_as(x) + self.b.expand_as(x)
return out
class Spectral_Binary_Activation(nn.Module):
def __init__(self):
super(Spectral_Binary_Activation, self).__init__()
self.beta = nn.Parameter(torch.ones(1), requires_grad=True)
def forward(self, x):
binary_activation_no_grad = torch.sign(x)
tanh_activation = torch.tanh(x * self.beta)
out = binary_activation_no_grad.detach() - tanh_activation.detach() + tanh_activation
return out
class RPReLU(nn.Module):
def __init__(self, inplanes):
super(RPReLU, self).__init__()
self.pr_bias0 = LearnableBias(inplanes)
self.pr_prelu = nn.PReLU(inplanes)
self.pr_bias1 = LearnableBias(inplanes)
def forward(self, x):
x = self.pr_bias1(self.pr_prelu(self.pr_bias0(x)))
return x
class HardBinaryConv(nn.Conv2d):
def __init__(self, in_chn, out_chn, kernel_size=3, stride=1, padding=1, groups=1, bias=True):
super(HardBinaryConv, self).__init__(in_chn, out_chn, kernel_size, stride=stride, padding=padding, groups=groups, bias=bias)
def forward(self, x):
real_weights = self.weight
scaling_factor = torch.mean(torch.mean(torch.mean(abs(real_weights), dim=3, keepdim=True), dim=2, keepdim=True), dim=1, keepdim=True)
scaling_factor = scaling_factor.detach()
binary_weights_no_grad = scaling_factor * torch.sign(real_weights)
cliped_weights = torch.clamp(real_weights, -1.0, 1.0)
binary_weights = binary_weights_no_grad.detach() - cliped_weights.detach() + cliped_weights
y = F.conv2d(x, binary_weights, self.bias, stride=self.stride, padding=self.padding, groups=self.groups)
return y
class BinaryConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=False, groups=1):
super(BinaryConv2d, self).__init__()
self.move0 = ReDistribution(in_channels)
self.binary_activation = Spectral_Binary_Activation()
self.binary_conv = HardBinaryConv(in_chn=in_channels, out_chn=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, bias=bias, groups=groups)
self.relu = RPReLU(in_channels)
def forward(self, x):
out = self.move0(x)
out = self.binary_activation(out)
out = self.binary_conv(out)
out = self.relu(out)
out = out + x
return out
class BinaryConv2d_Down(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=False, groups=1):
super(BinaryConv2d_Down, self).__init__()
self.biconv_1 = BinaryConv2d(in_channels, in_channels, kernel_size, stride, padding, bias, groups)
self.biconv_2 = BinaryConv2d(in_channels, in_channels, kernel_size, stride, padding, bias, groups)
self.avg_pool = nn.AvgPool2d(kernel_size=2, stride=2, padding=0)
def forward(self, x):
out = self.avg_pool(x)
out_1 = out
out_2 = out_1.clone()
out_1 = self.biconv_1(out_1)
out_2 = self.biconv_2(out_2)
out = torch.cat([out_1, out_2], dim=1)
return out
INIT_ARGS = {
'in_channels': 4,
'out_channels': 8,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'bias': False,
'groups': 1,
}
ARGS = {
'x': torch.randn(2, 4, 8, 6),
}
- 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 4, 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)
|
| BinaryConv2d_Down |
Ran ran on a synthesized input |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("c33ccd52313d598c") 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 4, 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 LearnableBias(nn.Module):
def __init__(self, out_chn):
super(LearnableBias, self).__init__()
self.bias = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True)
def forward(self, x):
out = x + self.bias.expand_as(x)
return out
class ReDistribution(nn.Module):
def __init__(self, out_chn):
super(ReDistribution, self).__init__()
self.b = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True)
self.k = nn.Parameter(torch.ones(1, out_chn, 1, 1), requires_grad=True)
def forward(self, x):
out = x * self.k.expand_as(x) + self.b.expand_as(x)
return out
class Spectral_Binary_Activation(nn.Module):
def __init__(self):
super(Spectral_Binary_Activation, self).__init__()
self.beta = nn.Parameter(torch.ones(1), requires_grad=True)
def forward(self, x):
binary_activation_no_grad = torch.sign(x)
tanh_activation = torch.tanh(x * self.beta)
out = binary_activation_no_grad.detach() - tanh_activation.detach() + tanh_activation
return out
class RPReLU(nn.Module):
def __init__(self, inplanes):
super(RPReLU, self).__init__()
self.pr_bias0 = LearnableBias(inplanes)
self.pr_prelu = nn.PReLU(inplanes)
self.pr_bias1 = LearnableBias(inplanes)
def forward(self, x):
x = self.pr_bias1(self.pr_prelu(self.pr_bias0(x)))
return x
class HardBinaryConv(nn.Conv2d):
def __init__(self, in_chn, out_chn, kernel_size=3, stride=1, padding=1, groups=1, bias=True):
super(HardBinaryConv, self).__init__(in_chn, out_chn, kernel_size, stride=stride, padding=padding, groups=groups, bias=bias)
def forward(self, x):
real_weights = self.weight
scaling_factor = torch.mean(torch.mean(torch.mean(abs(real_weights), dim=3, keepdim=True), dim=2, keepdim=True), dim=1, keepdim=True)
scaling_factor = scaling_factor.detach()
binary_weights_no_grad = scaling_factor * torch.sign(real_weights)
cliped_weights = torch.clamp(real_weights, -1.0, 1.0)
binary_weights = binary_weights_no_grad.detach() - cliped_weights.detach() + cliped_weights
y = F.conv2d(x, binary_weights, self.bias, stride=self.stride, padding=self.padding, groups=self.groups)
return y
class BinaryConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=False, groups=1):
super(BinaryConv2d, self).__init__()
self.move0 = ReDistribution(in_channels)
self.binary_activation = Spectral_Binary_Activation()
self.binary_conv = HardBinaryConv(in_chn=in_channels, out_chn=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, bias=bias, groups=groups)
self.relu = RPReLU(in_channels)
def forward(self, x):
out = self.move0(x)
out = self.binary_activation(out)
out = self.binary_conv(out)
out = self.relu(out)
out = out + x
return out
class BinaryConv2d_Down(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=False, groups=1):
super(BinaryConv2d_Down, self).__init__()
self.biconv_1 = BinaryConv2d(in_channels, in_channels, kernel_size, stride, padding, bias, groups)
self.biconv_2 = BinaryConv2d(in_channels, in_channels, kernel_size, stride, padding, bias, groups)
self.avg_pool = nn.AvgPool2d(kernel_size=2, stride=2, padding=0)
def forward(self, x):
out = self.avg_pool(x)
out_1 = out
out_2 = out_1.clone()
out_1 = self.biconv_1(out_1)
out_2 = self.biconv_2(out_2)
out = torch.cat([out_1, out_2], dim=1)
return out
INIT_ARGS = {
'in_channels': 4,
'out_channels': 8,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'bias': False,
'groups': 1
}
ARGS = {
'x': torch.randn(2, 4, 8, 8)
}
- 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 4, 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)
|
| BinaryConv2d_Fusion_Decrease |
Ran ran on a synthesized input |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("8da579fe8c29f239") 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 4, 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 LearnableBias(nn.Module):
def __init__(self, out_chn):
super(LearnableBias, self).__init__()
self.bias = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True)
def forward(self, x):
out = x + self.bias.expand_as(x)
return out
class ReDistribution(nn.Module):
def __init__(self, out_chn):
super(ReDistribution, self).__init__()
self.b = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True)
self.k = nn.Parameter(torch.ones(1, out_chn, 1, 1), requires_grad=True)
def forward(self, x):
out = x * self.k.expand_as(x) + self.b.expand_as(x)
return out
class Spectral_Binary_Activation(nn.Module):
def __init__(self):
super(Spectral_Binary_Activation, self).__init__()
self.beta = nn.Parameter(torch.ones(1), requires_grad=True)
def forward(self, x):
binary_activation_no_grad = torch.sign(x)
tanh_activation = torch.tanh(x * self.beta)
out = binary_activation_no_grad.detach() - tanh_activation.detach() + tanh_activation
return out
class RPReLU(nn.Module):
def __init__(self, inplanes):
super(RPReLU, self).__init__()
self.pr_bias0 = LearnableBias(inplanes)
self.pr_prelu = nn.PReLU(inplanes)
self.pr_bias1 = LearnableBias(inplanes)
def forward(self, x):
x = self.pr_bias1(self.pr_prelu(self.pr_bias0(x)))
return x
class HardBinaryConv(nn.Conv2d):
def __init__(self, in_chn, out_chn, kernel_size=3, stride=1, padding=1, groups=1, bias=True):
super(HardBinaryConv, self).__init__(in_chn, out_chn, kernel_size, stride=stride, padding=padding, groups=groups, bias=bias)
def forward(self, x):
real_weights = self.weight
scaling_factor = torch.mean(torch.mean(torch.mean(abs(real_weights), dim=3, keepdim=True), dim=2, keepdim=True), dim=1, keepdim=True)
scaling_factor = scaling_factor.detach()
binary_weights_no_grad = scaling_factor * torch.sign(real_weights)
cliped_weights = torch.clamp(real_weights, -1.0, 1.0)
binary_weights = binary_weights_no_grad.detach() - cliped_weights.detach() + cliped_weights
y = F.conv2d(x, binary_weights, self.bias, stride=self.stride, padding=self.padding, groups=self.groups)
return y
class BinaryConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=False, groups=1):
super(BinaryConv2d, self).__init__()
self.move0 = ReDistribution(in_channels)
self.binary_activation = Spectral_Binary_Activation()
self.binary_conv = HardBinaryConv(in_chn=in_channels, out_chn=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, bias=bias, groups=groups)
self.relu = RPReLU(in_channels)
def forward(self, x):
out = self.move0(x)
out = self.binary_activation(out)
out = self.binary_conv(out)
out = self.relu(out)
out = out + x
return out
class BinaryConv2d_Fusion_Decrease(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=False, groups=1):
super(BinaryConv2d_Fusion_Decrease, self).__init__()
self.biconv_1 = BinaryConv2d(out_channels, out_channels, kernel_size, stride, padding, bias, groups)
self.biconv_2 = BinaryConv2d(out_channels, out_channels, kernel_size, stride, padding, bias, groups)
def forward(self, x):
b, c, h, w = x.shape
out = x
out_1 = out[:, :c // 2, :, :]
out_2 = out[:, c // 2:, :, :]
out_1 = self.biconv_1(out_1)
out_2 = self.biconv_2(out_2)
out = (out_1 + out_2) / 2
return out
INIT_ARGS = {
'in_channels': 8,
'out_channels': 4,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'bias': False,
'groups': 1
}
ARGS = {
'x': torch.randn(2, 8, 4, 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 4, 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)
|
| BinaryConv2d_Fusion_Increase |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("de2394f77e6f55a2") 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 4, 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 numpy as np
from scipy import ndimage
INIT_ARGS = {
'in_channels': 4,
'out_channels': 8,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'bias': False,
'groups': 1
}
# Create input tensor: batch=2, channels=4, height=6, width=8
input_tensor = torch.randn(2, 4, 6, 8)
ARGS = {
'x': input_tensor
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, scipy, 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 — 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)
|
| BinaryConv2d_Fusion_Increase |
Ran ran on a synthesized input |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("4dcd051857965e58") 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 4, 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 numpy as np
from scipy import signal
INIT_ARGS = {
'in_channels': 4,
'out_channels': 8,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'bias': False,
'groups': 1
}
# Create input tensor: batch=2, channels=4, height=6, width=8
input_tensor = torch.randn(2, 4, 6, 8)
ARGS = {
'x': input_tensor
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, scipy, 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 — 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)
|
| HardBinaryConv |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("2282b5a48c53b6f2") 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 4, 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
# INIT_ARGS for HardBinaryConv.__init__
INIT_ARGS = {
'in_chn': 3,
'out_chn': 5,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'groups': 1,
'bias': True
}
# ARGS for HardBinaryConv.forward
# Input tensor: batch_size=2, channels=3 (matching in_chn), height=8, width=6
ARGS = {
'x': torch.randn(2, 3, 8, 6)
}
- 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 4, 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)
|
| LearnableBias |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("1edc0f0d06ec8a08") 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 4, dtype family float, shape (2, 4, 3, 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
INIT_ARGS = {
'out_chn': 4
}
ARGS = {
'x': torch.randn(2, 4, 3, 3)
}
if __name__ == '__main__':
model = nn.LearnableBias(**INIT_ARGS)
output = model(**ARGS)
print(output.shape)
print(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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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)
|
| RPReLU |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("557c18172cb9afb3") 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 4, dtype family float, shape (2, 4, 3, 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
INIT_ARGS = {
'inplanes': 4
}
ARGS = {
'x': torch.randn(2, 4, 3, 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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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)
|
| ReDistribution |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("bb9c18d123ac21b0") 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 4, 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 numpy as np
# INIT_ARGS: parameters for ReDistribution.__init__
INIT_ARGS = {
'out_chn': 6
}
# ARGS: parameters for ReDistribution.forward
# Create a batch of 2 images with 6 channels, height 5, width 7
ARGS = {
'x': torch.randn(2, 6, 5, 7)
}
- 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 4, 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)
|
| Spectral_Binary_Activation |
Ran ran on a synthesized input |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("8ff3d9498f6a69fc") 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
INIT_ARGS = {}
ARGS = {
'x': torch.randn(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 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)
|
| binaryconv1x1 |
Ran ran on a synthesized input |
caiyuanhao1998/BiSCI/real/test_code/architecture/BirealNet.py code served (permissive licence) · get_code("5792dd7496f9b2ab") 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 HardBinaryConv. 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 function binaryconv1x1 takes parameters:
# - in_planes: int
# - out_planes: int
# - stride: int (default=1)
# - groups: int (default=1)
# - bias: bool (default=False)
ARGS = {
'in_planes': 3,
'out_planes': 4,
'stride': 1,
'groups': 1,
'bias': False
}
- 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 HardBinaryConv — a HardBinaryConv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HardBinaryConv 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
|
| binaryconv1x1 |
Ran ran on a synthesized input |
caiyuanhao1998/BiSCI/real/test_code/architecture/IRNet.py code served (permissive licence) · get_code("33b90c805ed89acc") 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 IRConv2d. 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 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 = {
"in_planes": 3,
"out_planes": 16,
"stride": 1,
"groups": 1,
"bias": False,
}
- 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 IRConv2d — a IRConv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IRConv2d 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
|
| binaryconv1x1 |
Ran ran on a synthesized input |
caiyuanhao1998/BiSCI/real/test_code/architecture/ReActNet.py code served (permissive licence) · get_code("74674288d8d538c8") 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 HardBinaryConv. 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 = {
'in_planes': 3,
'out_planes': 16,
'stride': 1,
'groups': 1,
'bias': False
}
- 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 HardBinaryConv — a HardBinaryConv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HardBinaryConv 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
|
| binaryconv3x3 |
Ran ran on a synthesized input |
caiyuanhao1998/BiSCI/real/test_code/architecture/BirealNet.py code served (permissive licence) · get_code("31e65d8d2a126bf7") 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 HardBinaryConv. 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 = {
'in_planes': 3,
'out_planes': 16,
'stride': 1,
'groups': 1,
'bias': False
}
- 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 HardBinaryConv — a HardBinaryConv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HardBinaryConv 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
|
| binaryconv3x3 |
Ran ran on a synthesized input |
caiyuanhao1998/BiSCI/real/test_code/architecture/IRNet.py code served (permissive licence) · get_code("73a38f446f78bba0") 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 IRConv2d. 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 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 = {
"in_planes": 3,
"out_planes": 4,
"stride": 1,
"groups": 1,
"bias": False,
}
- 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 IRConv2d — a IRConv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IRConv2d 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
|
| binaryconv3x3 |
Ran ran on a synthesized input |
caiyuanhao1998/BiSCI/real/test_code/architecture/ReActNet.py code served (permissive licence) · get_code("0e5a72e209254e33") 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 HardBinaryConv. 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 = {
'in_planes': 3,
'out_planes': 16,
'stride': 1,
'groups': 1,
'bias': False,
}
- 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 HardBinaryConv — a HardBinaryConv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HardBinaryConv 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
|
| compare_mse |
Ran ran, violated the contract we drafted |
caiyuanhao1998/BiSCI/real/test_code/utils.py pointer only (licence: MIT); the stored copy get_code serves, from myuli/padut, is pointer only (licence: NONE) · get_code("71b435ef5d23a28c") How it ranThe body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from myuli/padut, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| compare_psnr |
Ran ran, violated the contract we drafted |
caiyuanhao1998/BiSCI/real/test_code/utils.py pointer only (licence: MIT); the stored copy get_code serves, from myuli/padut, is pointer only (licence: NONE) · get_code("1f36c05f85bb9769") How it ranThe body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from myuli/padut, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| psnr |
Ran ran, honoured the contract we drafted |
caiyuanhao1998/BiSCI/real/test_code/utils.py pointer only (licence: MIT); the stored copy get_code serves, from myuli/padut, is pointer only (licence: NONE) · get_code("ef668407de8e4f52") How it ranThe body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from myuli/padut, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| shift_back |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
caiyuanhao1998/BiSCI/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("d8d6ba766e739efd") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 8, 64, 64) 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 4D tensor with shape [bs, nC, row, col]
# bs=2, nC=8, row=64, col=64
# The function expects row to be a divisor of 256 (down_sample = 256 // row)
# Using row=64 gives down_sample=4
bs = 2
nC = 8
row = 64
col = 64
inputs = torch.randn(bs, nC, row, col)
ARGS = {
'inputs': inputs,
'step': 2
}
- Setup block drafted by
- a language model, Claude Sonnet 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 4, dtype family float, shape (2, 8, 64, 64) — shape (2, 8, 64, 64) 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
|
| BiSRNet |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("30b366b4cdb60550") How it ran |
| BiSRNet |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("52ec403a09f9ec94") How it ran |
| BiSRNet_Block |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("c80465fe8fdadd47") How it ran |
| BiSRNet_Block |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("c9128cc5a3062c50") How it ran |
| BiSRNet_body |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("e365575c7ffa2057") How it ran |
| BiSRNet_body |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("0a7e54f0b4bbac3c") How it ran |
| BinaryConv2d_Fusion_Decrease |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("5abd7aed58a05422") How it ran |
| BinaryConv2d_Up |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("f96dabec82276fd1") How it ran |
| BinaryConv2d_Up |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("f2d8da7fa340a4e7") How it ran |
| FeedForward |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/MST/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("8e91a93014587b75") How it ran |
| FeedForward |
Not yet run unverified (harvested, no recorded run) |
caiyuanhao1998/bisci/real/test_code/architecture/BiSRNet.py code served (permissive licence) · get_code("1b97abd925d7af03") How it ran |