SYMBOL INDEX (274 symbols across 59 files) FILE: github_adventures/automata/model.py class CAModel (line 5) | class CAModel(nn.Module): method __init__ (line 32) | def __init__(self, n_channels=16, hidden_channels=128, fire_rate=0.5, ... method perceive (line 83) | def perceive(self, x): method update (line 102) | def update(self, x): method stochastic_update (line 121) | def stochastic_update(x, fire_rate): method get_living_mask (line 146) | def get_living_mask(x): method forward (line 167) | def forward(self, x): FILE: github_adventures/automata/train.py function load_image (line 14) | def load_image(path, size=40): function to_rgb (line 40) | def to_rgb(img_rgba): function make_seed (line 58) | def make_seed(size, n_channels): function main (line 82) | def main(argv=None): FILE: github_adventures/diffaugment/script.py function main (line 17) | def main(argv=None): FILE: github_adventures/diffaugment/utils.py class DatasetImages (line 6) | class DatasetImages(Dataset): method __init__ (line 22) | def __init__(self, path, transform=None): method __len__ (line 28) | def __len__(self): method __getitem__ (line 32) | def __getitem__(self, ix): class Generator (line 43) | class Generator(nn.Module): method __init__ (line 63) | def __init__(self, latent_dim, ngf=64): method forward (line 91) | def forward(self, x): class Discriminator (line 108) | class Discriminator(nn.Module): method __init__ (line 128) | def __init__(self, ndf=16, augment_module=None): method forward (line 161) | def forward(self, x): function init_weights_ (line 182) | def init_weights_(module): FILE: github_adventures/dino/evaluation.py function compute_knn (line 7) | def compute_knn(backbone, data_loader_train, data_loader_val): function compute_embedding (line 57) | def compute_embedding(backbone, data_loader): FILE: github_adventures/dino/train.py function main (line 17) | def main(): FILE: github_adventures/dino/utils.py class DataAugmentation (line 8) | class DataAugmentation: method __init__ (line 36) | def __init__( method __call__ (line 113) | def __call__(self, img): class Head (line 136) | class Head(nn.Module): method __init__ (line 173) | def __init__( method _init_weights (line 203) | def _init_weights(self, m): method forward (line 210) | def forward(self, x): class MultiCropWrapper (line 230) | class MultiCropWrapper(nn.Module): method __init__ (line 242) | def __init__(self, backbone, new_head): method forward (line 248) | def forward(self, x): class Loss (line 275) | class Loss(nn.Module): method __init__ (line 293) | def __init__( method forward (line 302) | def forward(self, student_output, teacher_output): method update_center (line 342) | def update_center(self, teacher_output): function clip_gradients (line 360) | def clip_gradients(model, clip=2.0): FILE: github_adventures/gpt/copy_and_generate.py function main (line 14) | def main(argv=None): FILE: github_adventures/gpt/model.py class CustomGELU (line 7) | class CustomGELU(nn.Module): method forward (line 10) | def forward(self, x): class Block (line 15) | class Block(nn.Module): method __init__ (line 51) | def __init__( method forward (line 87) | def forward(self, x): class GPT (line 115) | class GPT(nn.Module): method __init__ (line 168) | def __init__( method forward (line 204) | def forward(self, idx): FILE: github_adventures/gpt/utils.py function copy_parameter (line 4) | def copy_parameter(param_official, param_ours): function copy_block (line 23) | def copy_block(block_official, block_ours): function copy_model (line 60) | def copy_model(model_official, model_ours): function generate_token (line 89) | def generate_token( FILE: github_adventures/integer/bert.py function main (line 11) | def main(argv=None): FILE: github_adventures/integer/fetch_data.py function get_sequence (line 9) | def get_sequence(sequence_id): FILE: github_adventures/integer/glove.py function main (line 9) | def main(argv=None): FILE: github_adventures/integer/lstm.py function main (line 22) | def main(argv=None): FILE: github_adventures/integer/utils.py class CustomDataset (line 12) | class CustomDataset(Dataset): method __init__ (line 39) | def __init__( method __len__ (line 65) | def __len__(self): method __getitem__ (line 69) | def __getitem__(self, ix): class Network (line 74) | class Network(nn.Module): method __init__ (line 112) | def __init__( method forward (line 145) | def forward(self, x): function train_classifier (line 172) | def train_classifier(X, y, random_state=2): function create_classification_targets (line 221) | def create_classification_targets(indices): FILE: github_adventures/lottery/data.py class MNISTDataset (line 6) | class MNISTDataset(Dataset): method __init__ (line 26) | def __init__(self, root, train=True, download=True): method __len__ (line 41) | def __len__(self): method __getitem__ (line 45) | def __getitem__(self, ix): FILE: github_adventures/lottery/main.py function loop_dataloader (line 13) | def loop_dataloader(dataloader): function train (line 34) | def train( function main (line 103) | def main(argv=None): FILE: github_adventures/lottery/utils.py class MLP (line 8) | class MLP(nn.Module): method __init__ (line 30) | def __init__(self, n_features, hidden_layer_sizes, n_targets): method forward (line 41) | def forward(self, x): function prune_linear (line 65) | def prune_linear(linear, prune_ratio=0.3, method="l1"): function prune_mlp (line 94) | def prune_mlp(mlp, prune_ratio=0.3, method="l1"): function check_pruned_linear (line 127) | def check_pruned_linear(linear): function reinit_linear (line 148) | def reinit_linear(linear): function reinit_mlp (line 180) | def reinit_mlp(mlp): function copy_weights_linear (line 192) | def copy_weights_linear(linear_unpruned, linear_pruned): function copy_weights_mlp (line 213) | def copy_weights_mlp(mlp_unpruned, mlp_pruned): function compute_stats (line 232) | def compute_stats(mlp): FILE: github_adventures/mixer/official.py class MlpBlock (line 6) | class MlpBlock(nn.Module): method __call__ (line 10) | def __call__(self, x): class MixerBlock (line 16) | class MixerBlock(nn.Module): method __call__ (line 21) | def __call__(self, x): class MlpMixer (line 31) | class MlpMixer(nn.Module): method __call__ (line 40) | def __call__(self, x): FILE: github_adventures/mixer/ours.py class MlpBlock (line 5) | class MlpBlock(nn.Module): method __init__ (line 26) | def __init__(self, dim, mlp_dim=None): method forward (line 34) | def forward(self, x): class MixerBlock (line 54) | class MixerBlock(nn.Module): method __init__ (line 83) | def __init__( method forward (line 94) | def forward(self, x): class MlpMixer (line 120) | class MlpMixer(nn.Module): method __init__ (line 162) | def __init__( method forward (line 197) | def forward(self, x): FILE: github_adventures/mixer/test_compare.py function test_compare (line 17) | def test_compare( FILE: github_adventures/mixup/train.py function main (line 18) | def main(argv=None): FILE: github_adventures/mixup/utils.py class MLPClassifierMixup (line 9) | class MLPClassifierMixup(nn.Module): method __init__ (line 38) | def __init__(self, n_features, hidden_dims, p=0): method forward (line 55) | def forward(self, x, start=0, end=None): class CustomDataset (line 82) | class CustomDataset(Dataset): method __init__ (line 94) | def __init__(self, X, y): method __len__ (line 105) | def __len__(self): method __getitem__ (line 109) | def __getitem__(self, ix): function generate_spirals (line 114) | def generate_spirals( function generate_prediction_img (line 184) | def generate_prediction_img( FILE: github_adventures/ner_evaluation/ours.py function check_valid (line 6) | def check_valid(annots: list[str]) -> bool: function get_etypes (line 25) | def get_etypes(annots: list[str]) -> list[None | str]: function get_entities (line 29) | def get_entities(annots: list[str]) -> list[dict[str, int | str]]: function get_report (line 81) | def get_report(annots_true: list[str], annots_pred: list[str]) -> dict: FILE: github_adventures/ner_evaluation/test_ours.py function test_check_valid (line 23) | def test_check_valid(inp, out): function test_get_etypes (line 38) | def test_get_etypes(inp, out): function test_get_entities (line 72) | def test_get_entities(inp, out): function test_get_report (line 113) | def test_get_report(annots_true, annots_pred): FILE: github_adventures/neuron/evaluate_noise.py function main (line 13) | def main(argv=None): FILE: github_adventures/neuron/evaluate_shuffling.py function main (line 13) | def main(argv=None): FILE: github_adventures/neuron/evaluate_video.py function main (line 12) | def main(argv=None): FILE: github_adventures/neuron/solutions.py class Solution (line 9) | class Solution(abc.ABC): method clone (line 19) | def clone(self, obs): method get_action (line 23) | def get_action(self, obs): method get_n_features (line 27) | def get_n_features(self): method reset (line 35) | def reset(self): method get_params (line 43) | def get_params(self): method set_params (line 60) | def set_params(self, params): method get_n_params (line 83) | def get_n_params(self): class MLPSolution (line 87) | class MLPSolution(Solution): method __init__ (line 107) | def __init__(self, n_features=5, hidden_layer_sizes=(16,)): method clone (line 118) | def clone(self): method get_action (line 128) | def get_action(self, obs): method get_n_features (line 134) | def get_n_features(self): method reset (line 137) | def reset(self): class PermutationInvariantSolution (line 141) | class PermutationInvariantSolution(Solution): method __init__ (line 171) | def __init__( method clone (line 194) | def clone(self): method get_action (line 204) | def get_action(self, obs): method reset (line 212) | def reset(self): method get_n_features (line 216) | def get_n_features(self): FILE: github_adventures/neuron/tasks.py class IncompatibleNFeatures (line 8) | class IncompatibleNFeatures(Exception): class Task (line 12) | class Task: method __init__ (line 51) | def __init__( method reset_for_rollout (line 76) | def reset_for_rollout(self): method modify_obs (line 87) | def modify_obs(self, obs): method rollout (line 108) | def rollout(self, solution): FILE: github_adventures/neuron/torch_utils.py class MLP (line 6) | class MLP(nn.Module): method __init__ (line 23) | def __init__(self, n_features, hidden_layer_sizes): method forward (line 46) | def forward(self, obs): function pos_table (line 64) | def pos_table(n_embeddings, hidden_size): class AttentionMatrix (line 96) | class AttentionMatrix(nn.Module): method __init__ (line 120) | def __init__(self, hidden_size, proj_dim, scale=True): method forward (line 134) | def forward(self, data_q, data_k): class AttentionNeuron (line 162) | class AttentionNeuron(nn.Module): method __init__ (line 194) | def __init__( method forward (line 225) | def forward(self, obs, prev_action): class PermutationInvariantNetwork (line 281) | class PermutationInvariantNetwork(nn.Module): method __init__ (line 304) | def __init__( method forward (line 323) | def forward(self, obs, prev_action): FILE: github_adventures/neuron/trainer.py function save (line 20) | def save(folder, n_iter, solver, solution_inst): function get_fitness (line 47) | def get_fitness( function main (line 78) | def main(argv=None): FILE: github_adventures/pondernet/train.py function evaluate (line 21) | def evaluate(dataloader, module): function plot_distributions (line 102) | def plot_distributions(target, predicted): function plot_accuracy (line 142) | def plot_accuracy(accuracy): function main (line 173) | def main(argv=None): FILE: github_adventures/pondernet/utils.py class ParityDataset (line 6) | class ParityDataset(Dataset): method __init__ (line 22) | def __init__( method __len__ (line 39) | def __len__(self): method __getitem__ (line 43) | def __getitem__(self, idx): class PonderNet (line 60) | class PonderNet(nn.Module): method __init__ (line 93) | def __init__( method forward (line 106) | def forward(self, x): class ReconstructionLoss (line 182) | class ReconstructionLoss(nn.Module): method __init__ (line 193) | def __init__(self, loss_func): method forward (line 198) | def forward(self, p, y_pred, y_true): class RegularizationLoss (line 230) | class RegularizationLoss(nn.Module): method __init__ (line 244) | def __init__(self, lambda_p, max_steps=20): method forward (line 257) | def forward(self, p): FILE: github_adventures/product_quantization/convert.py function from_faiss (line 14) | def from_faiss(faiss_index: faiss.swigfaiss.IndexPQ) -> CustomIndexPQ: function main (line 45) | def main() -> int: FILE: github_adventures/product_quantization/custom.py class CustomIndexPQ (line 16) | class CustomIndexPQ: method __init__ (line 36) | def __init__( method train (line 66) | def train(self, X: np.ndarray) -> None: method encode (line 88) | def encode(self, X: np.ndarray) -> np.ndarray: method add (line 111) | def add(self, X: np.ndarray) -> None: method compute_asymmetric_distances (line 123) | def compute_asymmetric_distances(self, X: np.ndarray) -> np.ndarray: method search (line 164) | def search(self, X: np.ndarray, k: int) -> tuple[np.ndarray, np.ndarray]: FILE: github_adventures/product_quantization/parse.py function get_embeddings (line 15) | def get_embeddings(path: str, maximum: int | None = None) -> tuple[list[... FILE: github_adventures/product_quantization/run_gradio.py function run (line 40) | def run( FILE: github_adventures/siren/activations.py function fh (line 22) | def fh(inst, inp, out, number=0): FILE: github_adventures/siren/core.py function paper_init_ (line 8) | def paper_init_(weight, is_first=False, omega=1): class SineLayer (line 33) | class SineLayer(nn.Module): method __init__ (line 63) | def __init__( method forward (line 81) | def forward(self, x): class ImageSiren (line 96) | class ImageSiren(nn.Module): method __init__ (line 119) | def __init__( method forward (line 163) | def forward(self, x): function generate_coordinates (line 180) | def generate_coordinates(n): class PixelDataset (line 198) | class PixelDataset(Dataset): method __init__ (line 226) | def __init__(self, img): method __len__ (line 237) | def __len__(self): method __getitem__ (line 241) | def __getitem__(self, idx): class GradientUtils (line 258) | class GradientUtils: method gradient (line 260) | def gradient(target, coords): method divergence (line 281) | def divergence(grad, coords): method laplace (line 310) | def laplace(target, coords): FILE: github_adventures/vision_transformer/custom.py class PatchEmbed (line 5) | class PatchEmbed(nn.Module): method __init__ (line 31) | def __init__(self, img_size, patch_size, in_chans=3, embed_dim=768): method forward (line 45) | def forward(self, x): class Attention (line 67) | class Attention(nn.Module): method __init__ (line 103) | def __init__(self, dim, n_heads=12, qkv_bias=True, attn_p=0., proj_p=0.): method forward (line 115) | def forward(self, x): class MLP (line 161) | class MLP(nn.Module): method __init__ (line 192) | def __init__(self, in_features, hidden_features, out_features, p=0.): method forward (line 199) | def forward(self, x): class Block (line 223) | class Block(nn.Module): method __init__ (line 255) | def __init__(self, dim, n_heads, mlp_ratio=4.0, qkv_bias=True, p=0., a... method forward (line 273) | def forward(self, x): class VisionTransformer (line 292) | class VisionTransformer(nn.Module): method __init__ (line 349) | def __init__( method forward (line 395) | def forward(self, x): FILE: github_adventures/vision_transformer/verify.py function get_n_params (line 7) | def get_n_params(module): function assert_tensors_equal (line 10) | def assert_tensors_equal(t1, t2): FILE: mini_tutorials/bentoml/service.py class Request (line 13) | class Request(BaseModel): class Response (line 19) | class Response(BaseModel): function classify (line 24) | def classify(request: Request) -> Response: FILE: mini_tutorials/custom_optimizer_in_pytorch/custom.py class WeirdDescent (line 5) | class WeirdDescent(Optimizer): method __init__ (line 10) | def __init__(self, parameters, lr=1e-3): method step (line 14) | def step(self, closure=None): FILE: mini_tutorials/custom_optimizer_in_pytorch/src.py function rosenbrock (line 10) | def rosenbrock(xy): function run_optimization (line 27) | def run_optimization(xy_init, optimizer_class, n_iter, **optimizer_kwargs): function create_animation (line 67) | def create_animation(paths, FILE: mini_tutorials/embedding/src.py class CharacterDataset (line 12) | class CharacterDataset(Dataset): method __init__ (line 41) | def __init__(self, text, window_size=1, vocab_size=50): method __len__ (line 56) | def __len__(self): method __getitem__ (line 59) | def __getitem__(self, ix): class Network (line 68) | class Network(Module): method __init__ (line 92) | def __init__( method forward (line 117) | def forward(self, x, h=None, c=None): function compute_loss (line 149) | def compute_loss(cal, net, dataloader): function generate_text (line 160) | def generate_text(n_chars, net, dataset, initial_text="Hello", random_st... FILE: mini_tutorials/gradient_wrt_input/explain.py function func (line 9) | def func(inp, net=None, target=None): function compute_integrated_gradients (line 33) | def compute_integrated_gradients(inp, baseline, net, target, n_steps=100): FILE: mini_tutorials/gradient_wrt_input/fool.py function func (line 8) | def func(inp, net=None, target=None): function attack (line 33) | def attack(tensor, net, eps=1e-3, n_iter=50): FILE: mini_tutorials/gradient_wrt_input/utils.py function compute_gradient (line 6) | def compute_gradient(func, inp, **kwargs): function read_image (line 37) | def read_image(path): function to_array (line 64) | def to_array(tensor): function scale_grad (line 89) | def scale_grad(grad): FILE: mini_tutorials/haiku_basics/parameter.py function foo (line 8) | def foo(x: jnp.ndarray) -> jnp.ndarray: FILE: mini_tutorials/haiku_basics/reallife.py function foo (line 7) | def foo(x: jnp.ndarray) -> jnp.ndarray: FILE: mini_tutorials/haiku_basics/state.py function foo (line 8) | def foo(x: jnp.ndarray) -> jnp.ndarray: FILE: mini_tutorials/httpx_rate_limiting/script.py function send_request (line 11) | async def send_request(client: httpx.AsyncClient, semaphore: asyncio.Sem... function main (line 21) | async def main() -> int: FILE: mini_tutorials/mocking_neural_networks/app.py function get_top_k (line 8) | def get_top_k(sequence, tokenizer, model, k=10): FILE: mini_tutorials/mocking_neural_networks/test.py function test_with_real_objects (line 11) | def test_with_real_objects(k): function test_with_mock_objects (line 22) | def test_with_mock_objects(k): FILE: mini_tutorials/numpy_equality_testing/test.py function get_arrays (line 4) | def get_arrays(): function test___eq__ (line 32) | def test___eq__(): function test___eq__all (line 38) | def test___eq__all(): function test_array_equal (line 46) | def test_array_equal(): function test_allclose (line 56) | def test_allclose(): function test_testing_array_equal (line 67) | def test_testing_array_equal(): function test_testing_allclose (line 75) | def test_testing_allclose(): FILE: mini_tutorials/openai_function_calling/example.py function get_price (line 17) | def get_price(symbol: str, date: str) -> float: function calculate (line 27) | def calculate(a: float, b: float, op: str) -> float: FILE: mini_tutorials/rag_with_reranking/answer.py function generate_prompt (line 9) | def generate_prompt(question: str, contexts: str): FILE: mini_tutorials/visualizing_activations_with_forward_hooks/src.py class Network (line 8) | class Network(Module): method __init__ (line 9) | def __init__(self): method forward (line 17) | def forward(self, x): function activation_hook (line 33) | def activation_hook(inst, inp, out):