| BilinearDense |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("d69bcc085240a24a") 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, BilinearDense: 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 jax
import jax.numpy as jnp
import flax.linen as nn
# Create a simple test setup for BilinearDense
# The function takes x and z as inputs in __call__
# x should have shape (batch, feature_dim)
# z should have shape (batch, z_dim)
# out_dim is a required parameter
# Define small test tensors
batch_size = 2
x_dim = 4
z_dim = 3
out_dim = 5
# Create dummy inputs as JAX arrays
x = jnp.ones((batch_size, x_dim))
z = jnp.ones((batch_size, z_dim))
# Create ARGS dict with all parameters
ARGS = {
"out_dim": out_dim,
"kernel_init": nn.initializers.lecun_normal(),
"bias_init": nn.initializers.zeros,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type BilinearDense — 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 BilinearDense 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
|
| BilinearFirstMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("8f6f4cff35de62cf") 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, BilinearFirstMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
from jax import random
import math
default_bias_init = nn.initializers.zeros
default_kernel_init = nn.initializers.lecun_normal()
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
# Create minimal JAX arrays for testing
key = random.PRNGKey(0)
batch_size = 2
feature_dim = 4
context_dim = 3
# Dummy feature and context inputs
feature = jnp.ones((batch_size, feature_dim), dtype=jnp.float32)
context = jnp.ones((batch_size, context_dim), dtype=jnp.float32)
ARGS = {
"hidden_dim": 8,
"out_dim": 5,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type BilinearFirstMLP — 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 BilinearFirstMLP 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
|
| BilinearFullMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("0f917b109efda65c") 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, BilinearFullMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
from typing import Sequence, Dict, Callable, Tuple
import math
default_bias_init = nn.initializers.zeros
default_kernel_init = nn.initializers.lecun_normal()
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
class BilinearDense(nn.Module):
"""
Bilinear implementation as in:
Multiplicative Interactions and Where to Find Them, ICLR 2020, https://openreview.net/forum?id=rylnK6VtDH
"""
out_dim: int
kernel_init: Callable = default_kernel_init
bias_init: Callable = default_bias_init
@nn.compact
def __call__(self, x, z):
W_layer = nn.Dense(self.out_dim * x.shape[-1], kernel_init=self.kernel_init, bias_init=self.bias_init)
b_layer = nn.Dense(self.out_dim, kernel_init=self.kernel_init, bias_init=self.bias_init)
W = W_layer(z).reshape(-1, self.out_dim, x.shape[-1])
b = b_layer(z)[..., None]
out = W @ x[..., None] + b
return out.squeeze(-1)
class BilinearFullMLP(nn.Module):
hidden_dim: int
out_dim: int
@nn.compact
def __call__(self, feature, context):
f_d, c_d, h_d = (feature.shape[-1], context.shape[-1], self.hidden_dim)
bilinear1 = BilinearDense(self.hidden_dim, kernel_init=pytorch_init(f_d), bias_init=pytorch_init(f_d))
bilinear2 = BilinearDense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
bilinear3 = BilinearDense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear4 = nn.Dense(self.out_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
out = nn.relu(bilinear1(feature, context))
out = nn.relu(bilinear2(out, context))
out = nn.relu(bilinear3(out, context))
out = linear4(out)
return out
# Create sample JAX arrays for feature and context
feature = jnp.ones((2, 4)) # batch_size=2, feature_dim=4
context = jnp.ones((2, 3)) # batch_size=2, context_dim=3
ARGS = {
"hidden_dim": 5,
"out_dim": 2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type BilinearFullMLP — 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 BilinearFullMLP 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
|
| BilinearLastMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("a231dfdd79465ac6") 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, BilinearLastMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
# Set seed for reproducibility
jax.config.update('jax_default_prng_impl', 'threefry2x32')
ARGS = {
'hidden_dim': 8,
'out_dim': 4,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type BilinearLastMLP — 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 BilinearLastMLP 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
|
| ConcatFirstMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("bd41551ec9638504") 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, ConcatFirstMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import math
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
class ConcatFirstMLP(nn.Module):
hidden_dim: int
out_dim: int
@nn.compact
def __call__(self, feature, context):
f_d, c_d, h_d = (feature.shape[-1], context.shape[-1], self.hidden_dim)
network = nn.Sequential([nn.Dense(self.hidden_dim, kernel_init=pytorch_init(f_d + c_d), bias_init=pytorch_init(f_d + c_d)), nn.relu, nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d)), nn.relu, nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d)), nn.relu, nn.Dense(self.out_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))])
out = network(jnp.hstack([feature, context]))
return out
ARGS = {
"hidden_dim": 8,
"out_dim": 3,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ConcatFirstMLP — 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 ConcatFirstMLP 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
|
| ConcatFullMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("41028f940725e4a0") 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, ConcatFullMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import math
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
class ConcatFullMLP(nn.Module):
hidden_dim: int
out_dim: int
@nn.compact
def __call__(self, feature, context):
f_d, c_d, h_d = (feature.shape[-1], context.shape[-1], self.hidden_dim)
linear1 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(f_d + c_d), bias_init=pytorch_init(f_d + c_d))
linear2 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d + c_d), bias_init=pytorch_init(h_d + c_d))
linear3 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d + c_d), bias_init=pytorch_init(h_d + c_d))
linear4 = nn.Dense(self.out_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
out = nn.relu(linear1(jnp.hstack([feature, context])))
out = nn.relu(linear2(jnp.hstack([out, context])))
out = nn.relu(linear3(jnp.hstack([out, context])))
out = linear4(out)
return out
ARGS = {
"hidden_dim": 8,
"out_dim": 3,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ConcatFullMLP — 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 ConcatFullMLP 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
|
| ConcatLastMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("21b612feebc3499d") 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, ConcatLastMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import math
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
class ConcatLastMLP(nn.Module):
hidden_dim: int
out_dim: int
@nn.compact
def __call__(self, feature, context):
f_d, c_d, h_d = (feature.shape[-1], context.shape[-1], self.hidden_dim)
linear1 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(f_d), bias_init=pytorch_init(f_d))
linear2 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear3 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d + c_d), bias_init=pytorch_init(h_d + c_d))
linear4 = nn.Dense(self.out_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
out = nn.relu(linear1(feature))
out = nn.relu(linear2(out))
out = nn.relu(linear3(jnp.hstack([out, context])))
out = linear4(out)
return out
# Create model instance
model = ConcatLastMLP(hidden_dim=8, out_dim=3)
# Create sample inputs
key = jax.random.PRNGKey(0)
batch_size = 2
feature_dim = 4
context_dim = 5
feature = jnp.ones((batch_size, feature_dim))
context = jnp.ones((batch_size, context_dim))
# Initialize model parameters
params = model.init(key, feature, context)
# Test forward pass
output = model.apply(params, feature, context)
ARGS = {
"hidden_dim": 8,
"out_dim": 3,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ConcatLastMLP — 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 ConcatLastMLP 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
|
| FiLM |
Ran ran on a synthesized input · constructed an object; no result was computed |
zzmtsvv/sac_rnd/rnd_modules.py pointer only (licence: NONE) · get_code("ceefac1ae561a6c3") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/sac_rnd 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. |
| FilmFirstMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("be3f4b3f06b0e6bd") 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, FilmFirstMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import math
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
class FilmFirstMLP(nn.Module):
hidden_dim: int
out_dim: int
@nn.compact
def __call__(self, feature, context):
f_d, c_d, h_d = (feature.shape[-1], context.shape[-1], self.hidden_dim)
film = nn.Dense(2 * self.hidden_dim, kernel_init=pytorch_init(c_d), bias_init=pytorch_init(c_d))
linear1 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(f_d), bias_init=pytorch_init(f_d))
linear2 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear3 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear4 = nn.Dense(self.out_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
gamma, beta = jnp.split(film(context), 2, axis=-1)
out = nn.relu(gamma * linear1(feature) + beta)
out = nn.relu(linear2(out))
out = nn.relu(linear3(out))
out = linear4(out)
return out
# Create test inputs
key = jax.random.PRNGKey(0)
batch_size = 2
feature_dim = 4
context_dim = 3
hidden_dim = 5
out_dim = 6
feature = jax.random.normal(key, shape=(batch_size, feature_dim))
context = jax.random.normal(key, shape=(batch_size, context_dim))
ARGS = {
"hidden_dim": hidden_dim,
"out_dim": out_dim,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type FilmFirstMLP — 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 FilmFirstMLP 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
|
| FilmFullMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("91e0406ad5665e10") 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, FilmFullMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import math
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
class FilmFullMLP(nn.Module):
hidden_dim: int
out_dim: int
@nn.compact
def __call__(self, feature, context):
f_d, c_d, h_d = (feature.shape[-1], context.shape[-1], self.hidden_dim)
film = nn.Dense(2 * self.hidden_dim * 3, kernel_init=pytorch_init(c_d), bias_init=pytorch_init(c_d))
linear1 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(f_d), bias_init=pytorch_init(f_d))
linear2 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear3 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear4 = nn.Dense(self.out_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
gamma, beta = jnp.split(film(context).reshape(context.shape[0], 3, -1), 2, axis=-1)
out = nn.relu(gamma[:, 0] * linear1(feature) + beta[:, 0])
out = nn.relu(gamma[:, 1] * linear2(out) + beta[:, 1])
out = nn.relu(gamma[:, 2] * linear3(out) + beta[:, 2])
out = linear4(out)
return out
key = jax.random.PRNGKey(0)
batch_size = 2
feature_dim = 4
context_dim = 3
hidden_dim = 5
out_dim = 6
feature = jax.random.normal(key, (batch_size, feature_dim))
context = jax.random.normal(key, (batch_size, context_dim))
model = FilmFullMLP(hidden_dim=hidden_dim, out_dim=out_dim)
params = model.init(key, feature, context)
output = model.apply(params, feature, context)
ARGS = {
"hidden_dim": hidden_dim,
"out_dim": out_dim
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type FilmFullMLP — 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 FilmFullMLP 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
|
| FilmLastMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("3ea09b9fb948e867") 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, FilmLastMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import math
def pytorch_init(fan_in: float):
"""
Default init for PyTorch Linear layer weights and biases:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
"""
bound = math.sqrt(1 / fan_in)
def _init(key, shape, dtype):
return jax.random.uniform(key, shape=shape, minval=-bound, maxval=bound, dtype=dtype)
return _init
class FilmLastMLP(nn.Module):
hidden_dim: int
out_dim: int
@nn.compact
def __call__(self, feature, context):
f_d, c_d, h_d = (feature.shape[-1], context.shape[-1], self.hidden_dim)
film = nn.Dense(2 * self.hidden_dim, kernel_init=pytorch_init(c_d), bias_init=pytorch_init(c_d))
linear1 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(f_d), bias_init=pytorch_init(f_d))
linear2 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear3 = nn.Dense(self.hidden_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
linear4 = nn.Dense(self.out_dim, kernel_init=pytorch_init(h_d), bias_init=pytorch_init(h_d))
gamma, beta = jnp.split(film(context), 2, axis=-1)
out = nn.relu(linear1(feature))
out = nn.relu(linear2(out))
out = nn.relu(gamma * linear3(out) + beta)
out = linear4(out)
return out
ARGS = {
"hidden_dim": 8,
"out_dim": 3,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type FilmLastMLP — 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 FilmLastMLP 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
|
| GatedMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("12f4f05b82493956") 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, GatedMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
# Initialize random keys for JAX
key = jax.random.PRNGKey(0)
# Create small test inputs
batch_size = 2
feature_dim = 4
context_dim = 3
hidden_dim = 5
out_dim = 6
# Create dummy feature and context arrays
feature = jnp.ones((batch_size, feature_dim))
context = jnp.ones((batch_size, context_dim))
# Define ARGS dictionary with all GatedMLP parameters
ARGS = {
"hidden_dim": hidden_dim,
"out_dim": out_dim,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type GatedMLP — 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 GatedMLP 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
|
| PredictorNetwork |
Ran ran on a synthesized input · constructed an object; no result was computed |
zzmtsvv/sac_rnd/rnd_modules.py pointer only (licence: NONE) · get_code("590f9905be494072") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/sac_rnd 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. |
| PriorNetwork |
Ran ran on a synthesized input · constructed an object; no result was computed |
zzmtsvv/sac_rnd/rnd_modules.py pointer only (licence: NONE) · get_code("d33f9e805bac2d2e") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/sac_rnd 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. |
| TorchBilinearDense |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("f08bbf7286cf9812") 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, TorchBilinearDense: 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 jax
import jax.numpy as jnp
import flax.linen as nn
# Set seed for reproducibility
key = jax.random.PRNGKey(0)
# Define tiny input and output dimensions for testing
batch_size = 2
x_dim = 4
z_dim = 3
out_dim = 5
# Create sample input tensors
x = jnp.ones((batch_size, x_dim), dtype=jnp.float32)
z = jnp.ones((batch_size, z_dim), dtype=jnp.float32)
# Define kernel and bias initializers
kernel_init = nn.initializers.lecun_normal()
bias_init = nn.initializers.zeros
# Construct ARGS dictionary with all parameters for TorchBilinearDense
ARGS = {
'out_dim': out_dim,
'kernel_init': kernel_init,
'bias_init': bias_init,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TorchBilinearDense — 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 TorchBilinearDense 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
|
| TorchBilinearFirstMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("7131c9d471efe1a4") 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, TorchBilinearFirstMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
# Set random seed for reproducibility
key = jax.random.PRNGKey(0)
# Define small tensors for feature and context inputs
# batch_size=2, feature_dim=4, context_dim=3
feature = jnp.ones((2, 4), dtype=jnp.float32)
context = jnp.ones((2, 3), dtype=jnp.float32)
# Define the arguments for TorchBilinearFirstMLP
ARGS = {
'hidden_dim': 5,
'out_dim': 6,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TorchBilinearFirstMLP — 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 TorchBilinearFirstMLP 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
|
| TorchBilinearFullMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("93814161ebae72e3") 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, TorchBilinearFullMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
# Set seed for reproducibility
jax.config.update("jax_default_prng_impl", "threefry2x32")
ARGS = {
"hidden_dim": 8,
"out_dim": 5,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TorchBilinearFullMLP — 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 TorchBilinearFullMLP 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
|
| TorchBilinearLastMLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("a9a4771d15f5a324") 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, TorchBilinearLastMLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
from jax import random
# Set up random key for JAX
key = random.PRNGKey(0)
# Create tiny input tensors
batch_size = 2
feature_dim = 4
context_dim = 3
hidden_dim = 5
out_dim = 6
# feature shape: (batch_size, feature_dim)
feature = jnp.ones((batch_size, feature_dim), dtype=jnp.float32)
# context shape: (batch_size, context_dim)
context = jnp.ones((batch_size, context_dim), dtype=jnp.float32)
ARGS = {
"hidden_dim": hidden_dim,
"out_dim": out_dim,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TorchBilinearLastMLP — 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 TorchBilinearLastMLP 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
|
| normalize |
Ran ran, honoured the contract we drafted |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("adb37ed22c2703a9") 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 ArrayImpl, 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 jax
import jax.numpy as jnp
# Create small JAX arrays for normalization
arr = jnp.array([[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0]], dtype=jnp.float32)
mean = jnp.array([3.0, 4.0, 5.0, 6.0], dtype=jnp.float32)
std = jnp.array([1.0, 1.5, 2.0, 2.5], dtype=jnp.float32)
eps = 1e-8
ARGS = {
"arr": arr,
"mean": mean,
"std": std,
"eps": eps,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, 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
|
| pytorch_init |
Ran ran; our contract draft was wrong, not the code |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("b62cf8b42971d060") 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 function. 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 jax
import math
# The function pytorch_init takes a single parameter: fan_in (a float)
# It returns an initialization function that uses jax.random.uniform
# The fan_in parameter is used to calculate a bound for uniform initialization
fan_in_value = 10.0
ARGS = {
"fan_in": fan_in_value,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
|
| DRND |
Not yet run unverified (harvested, no recorded run) |
zzmtsvv/sac_drnd/drnd_modules.py pointer only (licence: NONE) · get_code("c901b83a37fd3070") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/sac_drnd 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. No invocation recorded. |
| EnsembledFiLM |
Not yet run unverified (harvested, no recorded run) |
zzmtsvv/sac_drnd/drnd_modules.py pointer only (licence: NONE) · get_code("7120bed03164d5ad") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/sac_drnd 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. No invocation recorded. |
| EnsembledTargetNetwork |
Not yet run unverified (harvested, no recorded run) |
zzmtsvv/sac_drnd/drnd_modules.py pointer only (licence: NONE) · get_code("bc04133ae453cf88") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/sac_drnd 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. No invocation recorded. |
| RND |
Not yet run unverified (harvested, no recorded run) |
tinkoff-ai/sac-rnd/offline_sac/networks.py code served (permissive licence) · get_code("ffdc71693d91c600") How it ran |
| RND |
Not yet run unverified (harvested, no recorded run) |
zzmtsvv/sac_rnd/rnd_modules.py pointer only (licence: NONE) · get_code("28ed96e0bf8e9eab") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/sac_rnd 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. No invocation recorded. |
| train |
Not yet run unverified (harvested, no recorded run) |
shidilrzf/anti-exploration-rl/examples/train_ae.py code served (permissive licence) · get_code("226a9594f55e107f") How it ran |