| BSFT |
Ran ran on a synthesized input · constructed an object; no result was computed |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("3354a1b502b848d4") 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, BSFT: 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
import torch.nn.functional as F
torch.manual_seed(0)
# Define the function and class as provided
def Conv1d(*args, **kwargs):
layer = nn.Conv1d(*args, **kwargs)
nn.init.kaiming_normal_(layer.weight)
return layer
silu = F.silu
class BSFT(nn.Module):
def __init__(self, nhidden, out_channels):
super().__init__()
self.mlp_shared = nn.Conv1d(2, nhidden, kernel_size=3, padding=1)
self.mlp_gamma = Conv1d(nhidden, out_channels, kernel_size=3, padding=1)
self.mlp_beta = Conv1d(nhidden, out_channels, kernel_size=3, padding=1)
def forward(self, x, band):
actv = silu(self.mlp_shared(band))
gamma = self.mlp_gamma(actv).unsqueeze(-1)
beta = self.mlp_beta(actv).unsqueeze(-1)
out = x * (1 + gamma) + beta
return out
# Create valid arguments for BSFT initialization
ARGS = {
'nhidden': 8,
'out_channels': 3
}
- 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 BSFT — 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 BSFT 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
|
| Conv1d |
Ran ran; our contract draft was wrong, not the code · constructed an object; no result was computed |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("2109126c17b0f297") 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, Conv1d: 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)
# Conv1d signature:
# Conv1d(in_channels, out_channels, kernel_size, stride=1, padding=0,
# dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
ARGS = {
'in_channels': 3,
'out_channels': 4,
'kernel_size': 5,
'stride': 1,
'padding': 0,
'dilation': 1,
'groups': 1,
'bias': True,
'padding_mode': 'zeros',
'device': None,
'dtype': None,
}
- 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 Conv1d — 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 Conv1d 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
|
| Conv2d |
Ran ran; our contract draft was wrong, not the code · constructed an object; no result was computed |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("f3aede0f86dce25f") 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, Conv2d: 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 = {
'in_channels': 3,
'out_channels': 4,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'dilation': 1,
'groups': 1,
'bias': True,
'padding_mode': 'zeros',
}
- 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 Conv2d — 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 Conv2d 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
|
| DiffusionEmbedding |
Ran ran on a synthesized input · constructed an object; no result was computed |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("daa1ce0045d6e8f9") 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, DiffusionEmbedding: 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
from math import sqrt, log
torch.manual_seed(0)
class DPMConfig:
def __init__(self):
self.pos_emb_channels = 8
self.pos_emb_scale = 1.0
class ArchConfig:
def __init__(self):
self.pos_emb_dim = 16
class HParams:
def __init__(self):
self.dpm = DPMConfig()
self.arch = ArchConfig()
hparams = HParams()
noise_level = torch.randn(2, 1)
ARGS = {
"hparams": hparams,
}
- 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 DiffusionEmbedding — 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 DiffusionEmbedding 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
|
| DiffusionEmbedding |
Ran ran on a synthesized input |
maum-ai/nuwave/model.py code served (permissive licence) · get_code("2c33ff18a8323072") 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, 6) 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
Linear = nn.Linear
silu = F.silu
class DiffusionEmbedding(nn.Module):
def __init__(self, hparam):
super().__init__()
self.n_channels = hparam.ddpm.pos_emb_channels
self.scale = hparam.ddpm.pos_emb_scale
self.out_channels = hparam.arch.pos_emb_dim
half_dim = self.n_channels // 2
exponents = torch.arange(half_dim, dtype=torch.float32) / float(half_dim)
exponents = 0.0001 ** exponents
self.register_buffer('exponents', exponents)
self.projection1 = Linear(self.n_channels, self.out_channels)
self.projection2 = Linear(self.out_channels, self.out_channels)
def forward(self, noise_level):
x = self.scale * noise_level * self.exponents.unsqueeze(0)
x = torch.cat([x.sin(), x.cos()], dim=-1)
x = self.projection1(x)
x = silu(x)
x = self.projection2(x)
x = silu(x)
return x
class SimpleConfig:
def __init__(self):
self.ddpm = type('obj', (object,), {
'pos_emb_channels': 8,
'pos_emb_scale': 1.0
})()
self.arch = type('obj', (object,), {
'pos_emb_dim': 6
})()
INIT_ARGS = {
'hparam': SimpleConfig()
}
ARGS = {
'noise_level': torch.randn(2, 1)
}
if __name__ == '__main__':
model = DiffusionEmbedding(**INIT_ARGS)
output = model(**ARGS)
print(output.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 Tensor, ndim 2, dtype family float, shape (2, 6) — shape (2, 6) 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)
|
| FourierUnit |
Ran ran on a synthesized input · constructed an object; no result was computed |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("9a9ebaea33ca45d4") 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, FourierUnit: 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
import torch.nn.functional as F
torch.manual_seed(0)
# Small input tensor: batch=2, channels=3, length=512
x = torch.randn(2, 3, 512)
# Band tensor for BSFT: batch=2, channels=2, time_steps=some_value
# The band needs to match dimensions after STFT processing
# After STFT with n_fft=1024, hop_length=256, we get time_steps = (512 + 1024 - 1) // 256 + 1 = 7
# BSFT expects input with 2 channels (as seen in Conv1d(2, nhidden, ...))
band = torch.randn(2, 2, 7)
# Parameters for FourierUnit
in_channels = 3
out_channels = 4
bsft_channels = 8
filter_length = 1024
hop_length = 256
win_length = 1024
sampling_rate = 48000
ARGS = {
'in_channels': in_channels,
'out_channels': out_channels,
'bsft_channels': bsft_channels,
'filter_length': filter_length,
'hop_length': hop_length,
'win_length': win_length,
'sampling_rate': sampling_rate,
}
- 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 FourierUnit — 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 FourierUnit 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
|
| NUWave |
Ran ran on a synthesized input |
rishikksh20/NU-Wave2-pytorch/model.py code served (permissive licence) · get_code("7ce178bec79a2b6f") 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
class Params:
def __init__(self):
self.input_channels = 1
self.residual_channels = 8
self.output_channels = 1
self.residual_layers = 4
self.dilation_cycle_length = 3
params = Params()
INIT_ARGS = {
"params": params
}
batch_size = 2
audio_length = 16
lr_audio_length = audio_length // 2
audio = torch.randn(batch_size, audio_length)
lr_audio = torch.randn(batch_size, lr_audio_length)
noise_scale = torch.randn(batch_size)
ARGS = {
"audio": audio,
"lr_audio": lr_audio,
"noise_scale": noise_scale
}
- 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 could not observe it (import:OSError)
- 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)
|
| PositionalEncoding |
Ran ran on a synthesized input |
rishikksh20/NU-Wave2-pytorch/model.py code served (permissive licence) · get_code("078a37135b02e3e5") 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, 8) 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
GAMMA = 1 // 16
LINEAR_SCALE = 50000
class PositionalEncoding(nn.Module):
def __init__(self, n_channels):
super(PositionalEncoding, self).__init__()
self.n_channels = n_channels
def forward(self, noise_level):
if len(noise_level.shape) > 1:
noise_level = noise_level.squeeze(-1)
half_dim = self.n_channels // 2
exponents = torch.arange(half_dim, dtype=torch.float32).to(noise_level) / float(half_dim)
exponents = 10 ** (-(exponents * GAMMA))
exponents = LINEAR_SCALE * noise_level.unsqueeze(1) * exponents.unsqueeze(0)
return torch.cat([exponents.sin(), exponents.cos()], dim=-1)
INIT_ARGS = {
'n_channels': 8
}
ARGS = {
'noise_level': torch.randn(2)
}
if __name__ == '__main__':
model = PositionalEncoding(**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, 8) — shape (2, 8) 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)
|
| ResidualBlock |
Ran ran on a synthesized input |
maum-ai/nuwave/model.py code served (permissive licence) · get_code("6f6591c01b24cb00") 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
from math import sqrt
def Conv1d(*args, **kwargs):
layer = nn.Conv1d(*args, **kwargs)
nn.init.kaiming_normal_(layer.weight)
return layer
Linear = nn.Linear
class ResidualBlock(nn.Module):
def __init__(self, residual_channels, dilation, pos_emb_dim):
super().__init__()
self.dilated_conv = Conv1d(residual_channels, 2 * residual_channels, 3, padding=dilation, dilation=dilation)
self.diffusion_projection = Linear(pos_emb_dim, residual_channels)
self.output_projection = Conv1d(residual_channels, 2 * residual_channels, 1)
self.low_projection = Conv1d(residual_channels, 2 * residual_channels, 3, padding=dilation, dilation=dilation)
def forward(self, x, x_low, noise_level):
noise_level = self.diffusion_projection(noise_level).unsqueeze(-1)
y = x + noise_level
y = self.dilated_conv(y)
y += self.low_projection(x_low)
gate, filter = torch.chunk(y, 2, dim=1)
y = torch.sigmoid(gate) * torch.tanh(filter)
y = self.output_projection(y)
residual, skip = torch.chunk(y, 2, dim=1)
return ((x + residual) / sqrt(2.0), skip)
INIT_ARGS = {
'residual_channels': 4,
'dilation': 2,
'pos_emb_dim': 8,
}
ARGS = {
'x': torch.randn(2, 4, 16),
'x_low': torch.randn(2, 4, 16),
'noise_level': torch.randn(2, 8),
}
if __name__ == '__main__':
block = ResidualBlock(**INIT_ARGS)
residual_out, skip_out = block(**ARGS)
print(f"Residual output shape: {residual_out.shape}")
print(f"Skip output shape: {skip_out.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)
|
| ResidualBlock |
Ran ran on a synthesized input |
rishikksh20/NU-Wave2-pytorch/model.py code served (permissive licence) · get_code("aca7a68289a844b1") 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
from math import sqrt
def Conv1d(*args, **kwargs):
layer = nn.Conv1d(*args, **kwargs)
nn.init.kaiming_normal_(layer.weight)
return layer
Linear = nn.Linear
class ResidualBlock(nn.Module):
def __init__(self, residual_channels, dilation):
super().__init__()
self.dilated_conv = Conv1d(residual_channels, 2 * residual_channels, 3, padding=dilation, dilation=dilation)
self.diffusion_projection = Linear(512, residual_channels)
self.conditioner_projection = Conv1d(residual_channels, 2 * residual_channels, 3, padding=dilation, dilation=dilation)
self.output_projection = Conv1d(residual_channels, 2 * residual_channels, 1)
def forward(self, x, conditioner, noise_scale):
noise_scale = self.diffusion_projection(noise_scale).unsqueeze(-1)
conditioner = self.conditioner_projection(conditioner)
y = x + noise_scale
y = self.dilated_conv(y) + conditioner
gate, filter = torch.chunk(y, 2, dim=1)
y = torch.sigmoid(gate) * torch.tanh(filter)
y = self.output_projection(y)
residual, skip = torch.chunk(y, 2, dim=1)
return ((x + residual) / sqrt(2.0), skip)
INIT_ARGS = {
'residual_channels': 4,
'dilation': 2,
}
ARGS = {
'x': torch.randn(2, 4, 8),
'conditioner': torch.randn(2, 4, 8),
'noise_scale': torch.randn(2, 512),
}
if __name__ == '__main__':
model = ResidualBlock(**INIT_ARGS)
output = model(**ARGS)
print("Output shapes:", [o.shape for o in 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 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)
|
| SpectralTransform |
Ran ran on a synthesized input · constructed an object; no result was computed |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("8fb6ca0db41b032a") 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, SpectralTransform: 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
import torch.nn.functional as F
torch.manual_seed(0)
# Define the supporting functions and classes from the code
def Conv1d(*args, **kwargs):
layer = nn.Conv1d(*args, **kwargs)
nn.init.kaiming_normal_(layer.weight)
return layer
def Conv2d(*args, **kwargs):
layer = nn.Conv2d(*args, **kwargs)
nn.init.kaiming_normal_(layer.weight)
return layer
relu = F.relu
silu = F.silu
class BSFT(nn.Module):
def __init__(self, nhidden, out_channels):
super().__init__()
self.mlp_shared = nn.Conv1d(2, nhidden, kernel_size=3, padding=1)
self.mlp_gamma = Conv1d(nhidden, out_channels, kernel_size=3, padding=1)
self.mlp_beta = Conv1d(nhidden, out_channels, kernel_size=3, padding=1)
def forward(self, x, band):
actv = silu(self.mlp_shared(band))
gamma = self.mlp_gamma(actv).unsqueeze(-1)
beta = self.mlp_beta(actv).unsqueeze(-1)
out = x * (1 + gamma) + beta
return out
class FourierUnit(nn.Module):
def __init__(self, in_channels, out_channels, bsft_channels, filter_length=1024, hop_length=256, win_length=1024, sampling_rate=48000):
super(FourierUnit, self).__init__()
self.sampling_rate = sampling_rate
self.n_fft = filter_length
self.hop_size = hop_length
self.win_size = win_length
hann_window = torch.hann_window(win_length)
self.register_buffer('hann_window', hann_window)
self.conv_layer = Conv2d(in_channels=in_channels * 2, out_channels=out_channels * 2, kernel_size=1, padding=0, bias=False)
self.bsft = BSFT(bsft_channels, out_channels * 2)
def forward(self, x, band):
batch = x.shape[0]
x = x.view(-1, x.size()[-1])
ffted = torch.stft(x, self.n_fft, hop_length=self.hop_size, win_length=self.win_size, window=self.hann_window, center=True, normalized=True, onesided=True, return_complex=False)
ffted = ffted.permute(0, 3, 1, 2).contiguous()
ffted = ffted.view((batch, -1) + ffted.size()[2:])
ffted = relu(self.bsft(ffted, band))
ffted = self.conv_layer(ffted)
ffted = ffted.view((-1, 2) + ffted.size()[2:]).permute(0, 2, 3, 1).contiguous()
output = torch.istft(ffted, self.n_fft, hop_length=self.hop_size, win_length=self.win_size, window=self.hann_window, center=True, normalized=True, onesided=True)
output = output.view(batch, -1, x.size()[-1])
return output
class SpectralTransform(nn.Module):
def __init__(self, in_channels, out_channels, bsft_channels, **audio_kwargs):
super(SpectralTransform, self).__init__()
self.conv1 = Conv1d(in_channels, out_channels // 2, kernel_size=1, bias=False)
self.fu = FourierUnit(out_channels // 2, out_channels // 2, bsft_channels, **audio_kwargs)
self.conv2 = Conv1d(out_channels // 2, out_channels, kernel_size=1, bias=False)
def forward(self, x, band):
x = silu(self.conv1(x))
output = self.fu(x, band)
output = self.conv2(x + output)
return output
# Create sample input tensors
# x: (batch=2, in_channels=8, length=2048) - audio-like input
x = torch.randn(2, 8, 2048)
# band: (batch=2, 2, freq_bins) - band information for BSFT
band = torch.randn(2, 2, 256)
ARGS = {
'in_channels': 8,
'out_channels': 16,
'bsft_channels': 4,
'filter_length': 1024,
'hop_length': 256,
'win_length': 1024,
'sampling_rate': 48000
}
- 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 SpectralTransform — 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 SpectralTransform 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
|
| lognorm |
Ran ran, honoured the contract we drafted |
mindslab-ai/nuwave/lightning_model.py code served (permissive licence) · get_code("75b15c31859cc5da") 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 0, dtype family float, shape () 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)
# The function lognorm takes two parameters: pred and target
# Both are used with:
# - .abs() method
# - .mean(dim=-1) method
# - .clamp(min=1e-20) method
# - .log() method
# - .mean() method
# So both must be tensors with at least 2 dimensions (since mean(dim=-1) is called)
# Create small tensors: batch size 2, last dimension 4
pred = torch.randn(2, 4)
target = torch.randn(2, 4)
ARGS = {
"pred": pred,
"target": target,
}
- 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 0, dtype family float, shape () — shape () 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
|
| silu |
Ran ran, honoured the contract we drafted |
rishikksh20/NU-Wave2-pytorch/model.py code served (permissive licence) · get_code("d9caeeced554450f") 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, 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)
# The function silu takes a single parameter 'x' which is a tensor
# It applies the SiLU activation: x * sigmoid(x)
# We need to provide a small tensor as input
x = torch.randn(2, 4)
ARGS = {
"x": x
}
- 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, 4) — shape (2, 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
|
| DiffusionEmbedding |
Not yet run unverified (harvested, no recorded run) |
rishikksh20/NU-Wave2-pytorch/model.py code served (permissive licence) · get_code("816f7b789ef8c328") How it ran |
| FFC |
Not yet run unverified (harvested, no recorded run) |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("aea8c2dc5e778a5a") How it ran |
| NuWave |
Not yet run unverified (harvested, no recorded run) |
maum-ai/nuwave/model.py code served (permissive licence) · get_code("220987ed85906065") How it ran |
| NuWave2 |
Not yet run unverified (harvested, no recorded run) |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("1b16187bfba310a6") How it ran |
| ResidualBlock |
Not yet run unverified (harvested, no recorded run) |
mindslab-ai/nuwave2/model.py code served (permissive licence) · get_code("bdd9e43c2e01afe3") How it ran |