MCPcopy Create free account

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

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

↓ 1 callersFunctionadd_coord_dim
Adds a final dimension to the tensor representing 2D coordinates. Args: tensor: A PyTorch tensor of shape (B, D, H, W). Returns
models/utils.py:18
↓ 1 callersFunctionanalyze_trained_model
(run_model_spefic_save_dir, args, device)
tasks/parity/analysis/run.py:134
↓ 1 callersFunctionanalyze_training
(run_model_spefic_save_dir, args, device)
tasks/parity/analysis/run.py:164
↓ 1 callersFunctioncalculate_thinking_time
(normalized_entropy_per_elements, finish_type="min", entropy_threshold=0.1)
tasks/parity/analysis/run.py:51
↓ 1 callersFunctioncleanup_ddp
()
tasks/image_classification/train_distributed.py:165
↓ 1 callersFunctioncleanup_ddp
()
tasks/mazes/train_distributed.py:163
↓ 1 callersFunctioncompose_modular_expressions
(input_string)
tasks/qamnist/analysis/make_blog_gifs.py:30
↓ 1 callersMethodcompute_certainty
Compute the certainty of the current prediction.
models/lstm_qamnist.py:77
↓ 1 callersMethodcompute_certainty
Compute the certainty of the current prediction. We define certainty as being 1-normalised entropy. For legacy reas
models/ctm.py:280
↓ 1 callersFunctioncompute_ctc_accuracy
Computes the accuracy of the predictions given the targets, considering CTC decoding. Args: predictions: A tensor of shape [B, C, L]
tasks/sort/utils.py:43
↓ 1 callersFunctioncompute_ctc_loss
Computes the Connectionist Temporal Classification (CTC) loss. Args: predictions: A tensor of shape [B, C, L] representing the logit
utils/losses.py:6
↓ 1 callersFunctioncompute_decay
This function computes exponential decays for learnable synchronisation interactions between pairs of neurons.
models/utils.py:6
↓ 1 callersMethodcompute_features
Compute the key-value features from the input data using the backbone.
models/ctm.py:269
↓ 1 callersMethodcompute_features
Applies backbone and positional embedding to input.
models/lstm_rl.py:58
↓ 1 callersMethodcompute_features
Applies backbone and positional embedding to input.
models/lstm.py:77
↓ 1 callersFunctioncompute_mean_std_over_runs
(steps_list, values_list, num_interpolation_points, smooth_window)
tasks/rl/analysis/run.py:78
↓ 1 callersMethodcompute_synchronisation
Compute the synchronisation between neurons.
models/ctm_rl.py:64
↓ 1 callersFunctioncreate_accuracies_heatmap_gif
(all_accuracies, all_average_thinking_times, all_std_thinking_times, scale, save_dir, args)
tasks/parity/plotting.py:337
↓ 1 callersFunctioncreate_attentions_heatmap_gif
(all_attentions, scale, save_path, args)
tasks/parity/plotting.py:354
↓ 1 callersFunctioncreate_case_study_plots
(model, model_args, save_dir)
tasks/qamnist/analysis/run.py:136
↓ 1 callersFunctioncreate_episode_length_csv_and_activation_plots
(save_dir, args)
tasks/rl/analysis/run.py:257
↓ 1 callersFunctioncreate_stacked_gif
(save_path, y_shift=200)
tasks/parity/plotting.py:374
↓ 1 callersFunctioncreate_training_curves
(save_dir, log_dir, device)
tasks/rl/analysis/run.py:165
↓ 1 callersMethoddetermine_answer_step_type
(self, stepi: int)
models/modules.py:305
↓ 1 callersMethoddetermine_index_operator_step_type
Determine whether the current step is for index or operator.
models/ctm_qamnist.py:80
↓ 1 callersFunctionextract_model_and_iters
Extract model type and iteration number from name like 'CTM, 2 Iters.
tasks/rl/analysis/run.py:110
↓ 1 callersFunctionfilter_checkpoint_by_arch
(checkpoint_paths, arch)
tasks/rl/analysis/run.py:205
↓ 1 callersFunctionfilter_checkpoint_by_iters
(checkpoint_paths, iters)
tasks/rl/analysis/run.py:202
↓ 1 callersFunctionfilter_checkpoint_by_run
(checkpoint_paths, run)
tasks/rl/analysis/run.py:208
↓ 1 callersFunctionfilter_checkpoints
(checkpoint_paths, iters, arch, run)
tasks/rl/analysis/run.py:196
↓ 1 callersFunctionfind_center_of_mass
Alternative implementation using np.average and meshgrid. This version is generally faster and more concise. Args: array_2d: A 2
tasks/mazes/plotting.py:11
↓ 1 callersFunctionget_accuracy
(testloader, model, device, args)
tasks/qamnist/analysis/run.py:182
↓ 1 callersMethodget_attention
Get the attention module.
models/lstm.py:162
↓ 1 callersFunctionget_episode_lengths_from_checkpoint
(checkpoint)
tasks/rl/analysis/run.py:57
↓ 1 callersFunctionget_episode_rewards_from_checkpoint
(checkpoint)
tasks/rl/analysis/run.py:54
↓ 1 callersFunctionget_global_steps_from_checkpoint
(checkpoint)
tasks/rl/analysis/run.py:51
↓ 1 callersFunctionget_human_readable_name
(checkpoint_path)
tasks/rl/analysis/run.py:60
↓ 1 callersMethodget_kv_for_step
(self, stepi, x, z, thought_steps, prev_input=None, prev_kv=None)
models/lstm_qamnist.py:85
↓ 1 callersMethodget_kv_for_step
Get the key-value for the current step.
models/ctm_qamnist.py:91
↓ 1 callersMethodget_kv_proj
Get the key-value projection module.
models/lstm.py:166
↓ 1 callersMethodget_neuron_level_models
Neuron level models are one of the core innovations of the CTM. They apply separate MLPs/linears to each neuron. NOTE: the n
models/ctm.py:383
↓ 1 callersMethodget_neuron_select_type
Another helper method to accomodate our legacy neuron selection types. TODO: additional experimentation and possible removal of 'fir
models/ctm.py:474
↓ 1 callersMethodget_positional_embedding
Get the positional embedding module. For Imagenet and mazes we used NO positional embedding, and largely don't think that it
models/ctm.py:352
↓ 1 callersMethodget_positional_embedding
Get the positional embedding module.
models/lstm.py:147
↓ 1 callersMethodget_q_proj
Get the query projection module.
models/lstm.py:170
↓ 1 callersMethodget_solution
(self, x)
data/custom_datasets.py:205
↓ 1 callersMethodget_synapses
The synapse model is the recurrent model in the CTM. It's purpose is to share information across neurons. If using depth of 1, this i
models/ctm.py:415
↓ 1 callersMethodget_value
(self, x, ctm_state, done)
tasks/rl/train.py:243
↓ 1 callersFunctiongolden_test_model_parity
(golden_test_params_parity, device)
tests/conftest.py:39
↓ 1 callersFunctiongolden_test_model_qamnist
(golden_test_params_qamnist, device)
tests/conftest.py:87
↓ 1 callersFunctiongrab_synch_tensors
(model, s_type: str)
tests/tests.py:13
↓ 1 callersFunctionhas_solved_checker
Checks if a route solves a maze.
tasks/mazes/analysis/run.py:20
↓ 1 callersMethodinit_weights
(self)
models/modules.py:501
↓ 1 callersFunctioninitialise_dynamic_args
(args)
tasks/rl/train.py:359
↓ 1 callersFunctioninitialize_args
()
tasks/rl/train.py:354
↓ 1 callersFunctioninterpolate_post_activations
(arrays, target_length)
tasks/rl/analysis/make_blog_gifs.py:22
↓ 1 callersFunctionload_model
(agent, checkpoint_path, device)
tasks/rl/analysis/make_blog_gifs.py:17
↓ 1 callersFunctionmake_parity_gif
( predictions, targets, post_activations, attention_weights, inputs_to_model, save_pat
tasks/parity/analysis/make_blog_gifs.py:23
↓ 1 callersFunctionmake_qamnist_gif
(predictions, targets, post_activations, input_gates, inputs_to_model, save_path, question_readable, umap_posi
tasks/qamnist/analysis/make_blog_gifs.py:71
↓ 1 callersFunctionmake_rl_gif
(post_activations, inputs_to_model, action_probs, actions, save_path, umap_positions, umap_point_scaler=1.0)
tasks/rl/analysis/make_blog_gifs.py:38
↓ 1 callersFunctionparse_args
()
tasks/image_classification/train.py:58
↓ 1 callersFunctionparse_args
()
tasks/image_classification/train_distributed.py:61
↓ 1 callersFunctionparse_args
Parses command-line arguments.
tasks/image_classification/analysis/run_imagenet_analysis.py:62
↓ 1 callersFunctionparse_args
()
tasks/sort/train.py:55
↓ 1 callersFunctionparse_args
()
tasks/mazes/train.py:51
↓ 1 callersFunctionparse_args
()
tasks/mazes/train_distributed.py:61
↓ 1 callersFunctionparse_args
Parses command-line arguments for maze analysis.
tasks/mazes/analysis/run.py:80
↓ 1 callersFunctionparse_args
()
tasks/rl/train.py:30
↓ 1 callersFunctionparse_args
()
tasks/rl/analysis/run.py:25
↓ 1 callersFunctionparse_args
()
tasks/qamnist/train.py:59
↓ 1 callersFunctionparse_args
()
tasks/qamnist/analysis/run.py:21
↓ 1 callersFunctionparse_args
()
tasks/parity/train.py:34
↓ 1 callersFunctionparse_args
()
tasks/parity/analysis/run.py:20
↓ 1 callersFunctionplot_accuracy_all_runs
(training_data, evaluate_every, save_path="test_accuracy_comparison_parity.png", step=1, scale=1.0, smooth=Fal
tasks/parity/plotting.py:528
↓ 1 callersFunctionplot_accuracy_grid
(accuracy_matrix, num_digits_to_test, num_operations_to_test, scale, filename)
tasks/qamnist/analysis/run.py:90
↓ 1 callersFunctionplot_accuracy_heatmap
(overall_accuracies_avg, average_thinking_time, std_thinking_time, scale, save_path, args)
tasks/parity/plotting.py:304
↓ 1 callersFunctionplot_accuracy_individual_runs
(training_data, evaluate_every, save_dir, scale=1.0, smooth=False, x_max=None)
tasks/parity/plotting.py:695
↓ 1 callersFunctionplot_accuracy_operations
(accuracy_matrix, std_matrix, num_operations_to_test, num_digits_to_test, filename)
tasks/qamnist/analysis/run.py:58
↓ 1 callersFunctionplot_accuracy_thinking_time
(csv_path, scale, output_dir="analysis/cifar")
tasks/parity/plotting.py:795
↓ 1 callersFunctionplot_accuracy_training
(all_accuracies, scale, run_model_spefic_save_dir, args)
tasks/parity/plotting.py:421
↓ 1 callersFunctionplot_attention_heatmap
(overall_attentions_avg, scale, save_path, vmin=None, vmax=None)
tasks/parity/plotting.py:321
↓ 1 callersFunctionplot_input
(input_images, save_dir, filename)
tasks/parity/plotting.py:215
↓ 1 callersFunctionplot_loss_all_runs
(training_data, evaluate_every, save_path="train_loss_comparison_parity.png", step=1, scale=1.0, x_max=None)
tasks/parity/plotting.py:453
↓ 1 callersFunctionplot_loss_individual_runs
(training_data, evaluate_every, save_dir, scale=1.0, x_max=None)
tasks/parity/plotting.py:640
↓ 1 callersFunctionplot_lstm_last_and_certain_accuracy
(all_folders, save_path="lstm_last_and_certain_accuracy.png", scale=1.0, step=1, x_max=None)
tasks/parity/plotting.py:847
↓ 1 callersFunctionplot_prediction
(predictions, certainties, save_dir, filename, args)
tasks/parity/plotting.py:279
↓ 1 callersFunctionplot_probabilities
(predictions, certainties, save_dir, filename, args)
tasks/parity/plotting.py:256
↓ 1 callersFunctionplot_target
(targets, save_dir, filename, args)
tasks/parity/plotting.py:236
↓ 1 callersFunctionprepare_csv
(csv_filepath)
tasks/rl/analysis/run.py:221
↓ 1 callersFunctionrep_size
(neuron_select_type: str, n_synch: int)
tests/tests.py:7
↓ 1 callersFunctionrun_model_and_make_gif
(checkpoint_path, save_path, env_id, device)
tasks/rl/analysis/make_blog_gifs.py:186
↓ 1 callersFunctionrun_model_and_make_gif
(checkpoint_path, save_path, device)
tasks/qamnist/analysis/make_blog_gifs.py:256
↓ 1 callersFunctionrun_model_and_make_gif
(checkpoint_path, save_path, device)
tasks/parity/analysis/make_blog_gifs.py:217
↓ 1 callersFunctionrun_umap
(agent, model_args)
tasks/rl/analysis/make_blog_gifs.py:131
↓ 1 callersFunctionrun_umap
(model, model_args, device)
tasks/qamnist/analysis/make_blog_gifs.py:202
↓ 1 callersFunctionrun_umap
(model, testloader)
tasks/parity/analysis/make_blog_gifs.py:186
↓ 1 callersFunctionsave_model
(agent, optimizer, global_step, training_iteration, episode_rewards_tracking, episode_lengths_tracking, global
tasks/rl/train.py:259
↓ 1 callersMethodset_backbone
Set the backbone module based on the specified type.
models/ctm.py:336
↓ 1 callersMethodset_backbone
Set the backbone module based on the specified type.
models/lstm.py:133
↓ 1 callersMethodset_initial_rgb
This is largely to accommodate training on grayscale images and is legacy, but it doesn't hurt the model in any way that we can tell.
models/ctm.py:296
← previousnext →101–200 of 375, ranked by callers