MCPcopy Create free account

hub / github.com/SakanaAI/continuous-thought-machines / functions

Functions375 in github.com/SakanaAI/continuous-thought-machines

↓ 1 callersMethodset_initial_rgb
Set the initial RGB processing module based on the backbone type.
models/lstm.py:96
↓ 1 callersMethodset_num_digits
(self, num_digits)
data/custom_datasets.py:56
↓ 1 callersMethodset_num_operations
(self, num_operations)
data/custom_datasets.py:59
↓ 1 callersFunctionsetup_ddp
()
tasks/image_classification/train_distributed.py:134
↓ 1 callersFunctionsetup_ddp
()
tasks/mazes/train_distributed.py:136
↓ 1 callersMethodstep
(self, current_step)
utils/schedulers.py:10
↓ 1 callersFunctiontest_handcrafted_examples
(model, args, run_model_spefic_save_dir, device)
tasks/parity/analysis/run.py:63
↓ 1 callersMethodverify_args
Verify the validity of the input arguments to ensure consistent behaviour. Specifically when selecting neurons for sychronisation us
models/ctm.py:490
↓ 1 callersMethodverify_args
Verify the validity of the input arguments.
models/lstm.py:175
Method__getitem__
(self, idx)
data/custom_datasets.py:15
Method__getitem__
(self, idx)
data/custom_datasets.py:106
Method__getitem__
Args: index (int): Index Returns: tuple: (sample, target) where target is class_index of the target class.
data/custom_datasets.py:258
Method__getitem__
(self, idx)
data/custom_datasets.py:318
Method__init__
(self, dataset, num_replicas=None, rank=None, seed=0, epoch_steps=None)
utils/samplers.py:30
Method__init__
(self, dataset, batch_size)
utils/samplers.py:93
Method__init__
Args: optimizer (torch.optim.Optimizer): 最適化手法インスタンス warmup_epochs (int): linear warm
utils/schedulers.py:17
Method__init__
(self, optimizer, warmup_steps, milestones, gamma=0.1, last_epoch=-1, verbose=False)
utils/schedulers.py:76
Method__init__
(self, N)
data/custom_datasets.py:11
Method__init__
(self, base_dataset, num_images, num_images_delta, num_repeats_per_input, num_operations, num_operations_delta
data/custom_datasets.py:23
Method__init__
(self, root, transform=None, target_transform=None, loader=Image.open, is_v
data/custom_datasets.py:163
Method__init__
(self, sequence_length=64, length=100000)
data/custom_datasets.py:311
Method__init__
(self, size_action_space, args, device)
tasks/rl/train.py:111
Method__init__
(self, env: gym.Env)
tasks/rl/envs.py:10
Method__init__
(self, iterations, d_model, d_input, heads
models/lstm_qamnist.py:34
Method__init__
(self, iterations, d_model, d_input, heads
models/ctm.py:81
Method__init__
(self, iterations, d_model, d_input, backb
models/lstm_rl.py:24
Method__init__
(self, iterations, d_model, d_input, n_syn
models/ctm_rl.py:11
Method__init__
(self)
models/modules.py:19
Method__init__
(self, out_dims, depth, minimum_width=16,
models/modules.py:66
Method__init__
(self, in_dims, out_dims, N, T=1.0,
models/modules.py:183
Method__init__
(self, n_embeddings, d_embedding)
models/modules.py:242
Method__init__
(self, num_operator_types, d_projection)
models/modules.py:254
Method__init__
(self, max_seq_length, embedding_dim)
models/modules.py:263
Method__init__
(self, iterations_per_digit, iterations_per_question_part, total_iterations_for_answering, total_iterations_fo
models/modules.py:291
Method__init__
(self, d_input)
models/modules.py:319
Method__init__
(self, d_input, grid_size=7, num_objects=11, num_colors=6, num_states=3, embedding_dim=8)
models/modules.py:337
Method__init__
(self, d_input)
models/modules.py:373
Method__init__
(self)
models/modules.py:396
Method__init__
(self, resnet_type, fine_tune=True)
models/modules.py:424
Method__init__
(self, d_model, G=1, M=2, F_dim=256, H_dim=128,
models/modules.py:477
Method__init__
(self, d_model, G=1, M=2, F_dim=256, H_dim=128,
models/modules.py:546
Method__init__
(self, d_model)
models/modules.py:601
Method__init__
(self, d_model)
models/modules.py:668
Method__init__
(self, iterations, d_model, d_input, heads
models/ctm_qamnist.py:7
Method__init__
(self, iterations, d_model, d_input, heads
models/ctm_sort.py:10
Method__init__
(self, d_model, backbone_type, out_dims, d
models/ff.py:22
Method__init__
(self, iterations, d_model, d_input, heads
models/lstm.py:31
Method__init__
( self, inplanes, planes, stride=1, downsample=None, groups=1,
models/resnet.py:38
Method__init__
( self, inplanes, planes, stride=1, downsample=None, groups=1,
models/resnet.py:87
Method__iter__
Returns an iterator that yields 'num_samples_per_epoch' indices. It uses itertools.islice to take a finite slice from the inf
utils/samplers.py:70
Method__iter__
(self)
utils/samplers.py:98
Method__len__
The number of samples produced by the iterator per __iter__ call.
utils/samplers.py:81
Method__len__
(self)
utils/samplers.py:118
Method__len__
(self)
data/custom_datasets.py:13
Method__len__
(self)
data/custom_datasets.py:315
Function_create_model
(base_config, **overrides)
tests/conftest.py:278
Method_from_pretrained
Override to handle lazy weights initialization.
models/ctm.py:154
Functionauto_set_seed
(seed)
tests/conftest.py:23
Functionbase_params
()
tests/conftest.py:248
Functioncalculate_entropy_average_over_batch
(normalized_entropy_per_elements)
tasks/parity/analysis/run.py:42
Functioncalculate_thinking_time_average_over_batch
(normalized_entropy_per_elements)
tasks/parity/analysis/run.py:46
Methodconstruct
(self)
tasks/qamnist/analysis/make_blog_gifs_equation_animation.py:7
Functioncontains_only_zero_zero_ops
(q)
tasks/qamnist/analysis/run.py:132
Functiondevice
()
tests/conftest.py:15
Functionenvironment_to_test
()
tests/conftest.py:183
Methodforward
Forward pass - Reverted to structure closer to user's working version. Executes T=iterations steps.
models/lstm_qamnist.py:116
Methodforward
(self, x, track=False)
models/ctm.py:527
Methodforward
Forward pass - Reverted to structure closer to user's working version. Executes T=iterations steps.
models/lstm_rl.py:63
Methodforward
(self, x, hidden_states, track=False)
models/ctm_rl.py:151
Methodforward
(self, x)
models/modules.py:22
Methodforward
(self, x)
models/modules.py:40
Methodforward
(self, x)
models/modules.py:112
Methodforward
Args: x (torch.Tensor): Input tensor, expected shape (B, N, in_dims) where B=batch, N=d_model, in_d
models/modules.py:211
Methodforward
Maps -1 (negative parity) to 0 and 1 (positive) to 1
models/modules.py:246
Methodforward
(self, x)
models/modules.py:258
Methodforward
(self, x)
models/modules.py:277
Methodforward
(self, x)
models/modules.py:332
Methodforward
(self, x)
models/modules.py:354
Methodforward
(self, x)
models/modules.py:385
Methodforward
(self, x)
models/modules.py:408
Methodforward
(self, x)
models/modules.py:439
Methodforward
Computes positional encodings for the input feature map x. Args: x (torch.Tensor): Input feature map, shape (B, C, H, W)
models/modules.py:504
Methodforward
Computes combined positional encoding. Args: x (torch.Tensor): Input feature map, shape (B, C, H, W). Returns:
models/modules.py:564
Methodforward
Computes rotational positional embeddings based on input width. Args: x (torch.Tensor): Input tensor (used for shape and
models/modules.py:609
Methodforward
(self, x)
models/modules.py:672
Methodforward
(self, x, z, track=False)
models/ctm_qamnist.py:126
Methodforward
(self, x, track=False)
models/ctm_sort.py:64
Methodforward
(self, x)
models/ff.py:74
Methodforward
Forward pass - Reverted to structure closer to user's working version. Executes T=iterations steps.
models/lstm.py:192
Methodforward
(self, x)
models/resnet.py:65
Methodforward
(self, x)
models/resnet.py:113
Methodforward
(self, x)
models/resnet.py:268
Functionget_accuracy_and_loss_from_checkpoint
(checkpoint)
tasks/parity/analysis/run.py:219
Methodget_d_backbone
Get the dimensionality of the backbone output.
models/ctm_rl.py:80
Methodget_d_backbone
Get the dimensionality of the backbone output.
models/ctm_qamnist.py:60
Methodget_lr
(self)
utils/schedulers.py:51
Methodget_positional_embedding
Get the positional embedding module.
models/ctm_rl.py:94
Methodget_synapses
Get the synapse module. We found in our early experimentation that a single Linear, GLU and LayerNorm block performed worse than two
models/ctm_rl.py:99
Functiongolden_test_expected_action_entropy_rl
(device)
tests/conftest.py:210
Functiongolden_test_expected_action_log_prob_rl
(device)
tests/conftest.py:206
← previousnext →201–300 of 375, ranked by callers