Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HEmile/neurosymbolic-diffusion
/ functions
Functions
1,084 in github.com/HEmile/neurosymbolic-diffusion
⨍
Functions
1,084
◇
Types & classes
199
Method
__init__
(self, clazz: Type[LOG], args, prefix: str, enable_wandb: bool=True)
expressive/methods/logger.py:229
Method
__init__
( self, p: UnmaskingModel, problem: Problem, args: AbsArguments, )
expressive/methods/cond_model.py:23
Method
__init__
(self, dimension: int)
expressive/models/diffusion_model.py:40
Method
__init__
(self, Q: List[Tensor])
expressive/models/diffusion_model.py:88
Method
__init__
(self, fw: ForwardModel[Tensor], fy: ForwardModel[Tensor])
expressive/models/diffusion_model.py:168
Method
__init__
(self, K: int, args: Arguments)
expressive/models/diffusion_model.py:191
Method
__init__
(self, t0_model, K: int, args: Arguments)
expressive/models/diffusion_model.py:214
Method
__init__
(self, w_0_model: nn.Module, K_W: int, K_Y: int, args: Arguments)
expressive/models/diffusion_model.py:225
Method
__init__
(self, q: ForwardModel[DATA])
expressive/models/diffusion_model.py:251
Method
__init__
(self, dim: int, vocab_dim: int)
expressive/models/diffusion_model.py:276
Method
__init__
(self, hidden_size: int, out_channels: int, cond_dim: int)
expressive/models/diffusion_model.py:310
Method
__init__
:param vocab_dim: Number of possible values for W (and Y, if using), **excluding** mask dimension :param w_dims: The first dimensions
expressive/models/diffusion_model.py:325
Method
__init__
(self, hidden_size, frequency_embedding_size=256)
expressive/models/dit.py:38
Method
__init__
(self, hidden_size, num_heads, mlp_ratio=4.0, **block_kwargs)
expressive/models/dit.py:84
Method
__len__
(self)
expressive/experiments/rsbench/utils/tcav/tcav/mydata.py:19
Method
__len__
(self)
expressive/experiments/rsbench/utils/tcav/tcav/mydata.py:58
Method
__len__
(self)
expressive/experiments/rsbench/preprocessing/mnist/mnist_creation.py:88
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/kand_creation.py:153
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/kand_creation.py:223
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/kand_creation.py:387
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/kand_creation.py:494
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/old_kand_creation.py:66
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/sddoia_creation.py:231
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/sddoia_creation.py:428
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/boia_creation.py:59
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/boia_creation.py:169
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/presddoia_creation.py:102
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/mnist_creation.py:82
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/mnmath_creation.py:93
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/xor_creation.py:92
Method
__len__
(self)
expressive/experiments/rsbench/datasets/utils/clip_mnst_creation.py:135
Method
__len__
(self)
expressive/experiments/path_planning/data/dataloader.py:29
Method
__len__
Returns the number of samples in the dataset.
expressive/experiments/mnist_op/data.py:150
Method
_basic_init
(module)
expressive/models/dit.py:150
Method
_concatenate_embeddings
(self, emb_list)
expressive/experiments/rsbench/backbones/disjointmnistcnn.py:56
Function
_convert_image_to_rgb
(image)
expressive/experiments/rsbench/preprocessing/clip/clip.py:92
Function
_convert_weights_to_fp16
(l)
expressive/experiments/rsbench/preprocessing/clip/model.py:455
Method
_extract_number
(self, path)
expressive/experiments/rsbench/datasets/utils/sddoia_creation.py:214
Method
_extract_number
(self, path)
expressive/experiments/rsbench/datasets/utils/sddoia_creation.py:410
Method
_extract_number
(self, path)
expressive/experiments/rsbench/datasets/utils/presddoia_creation.py:91
Method
_extract_number
(self, path)
expressive/experiments/rsbench/datasets/utils/mnmath_creation.py:77
Method
_extract_number
(self, path)
expressive/experiments/rsbench/datasets/utils/xor_creation.py:76
Method
_f_cos
(t: int)
expressive/models/diffusion_model.py:194
Function
accuracy
Computes the precision@k for the specified values of k
expressive/experiments/rsbench/utils/metrics.py:17
Method
and_diff
(f1, f2, f3, concept_type)
expressive/experiments/rsbench/utils/kand_ltn_loss.py:159
Method
and_pair
(f1, f2, f3, concept_type)
expressive/experiments/rsbench/utils/kand_ltn_loss.py:150
Method
and_same
(f1, f2, f3, concept_type)
expressive/experiments/rsbench/utils/kand_ltn_loss.py:141
Function
build_clevr_worlds_queries_matrix
(max_n_images=4, n_concepts=19)
expressive/experiments/rsbench/models/utils/utils_problog.py:541
Function
build_model_dict
Define dictionary of pre-compiled ProbLog models
expressive/experiments/rsbench/models/utils/utils_problog.py:246
Method
build_weights_dictionary
Returns the weights dictionary used during ProbLog inference to update the graph semiring.
expressive/experiments/rsbench/models/utils/deepproblog_modules.py:98
Function
build_world_queries_matrix_LR
()
expressive/experiments/rsbench/models/utils/utils_problog.py:718
Function
build_world_queries_matrix_complete_FS
()
expressive/experiments/rsbench/models/utils/utils_problog.py:600
Function
build_worlds_queries_matrix_kandinsky
Build Worlds Queries Matrices The Kandinsky Figure has two pairs of objects with the same shape, in one pair the objects have the same co
expressive/experiments/rsbench/models/utils/utils_problog.py:269
Function
calculate_mean_pCs
Get concept probabilities for mcdropout Args: ensemble_c_prb_1 (ndarray): ensemble probability for concept 1 ensemble_c_prb_2 (nd
expressive/experiments/rsbench/utils/metrics.py:1072
Method
calculate_tcav_score
(self, layer_name, output_path)
expressive/experiments/rsbench/utils/tcav/tcav/tcav.py:157
Function
class_mean_entropy
Function which computes a mean entropy per class Args: probabilities (ndarray): probability vector true_classes (ndarray): grount
expressive/experiments/rsbench/utils/metrics.py:1275
Function
class_mean_variance
Function which computes the class mean variance Args: probabilities (ndarray): probability vector true_classes (ndarray): grountr
expressive/experiments/rsbench/utils/metrics.py:1309
Function
compute_clevr_predictions
(logits)
expressive/experiments/rsbench/utils/metrics.py:808
Function
compute_logic_forward
(or_three_bits, concepts: torch.Tensor)
expressive/experiments/rsbench/models/utils/utils_problog.py:837
Function
compute_logic_left
(or_three_bits, concepts: torch.Tensor)
expressive/experiments/rsbench/models/utils/utils_problog.py:922
Function
compute_logic_no_left
(or_three_bits, concepts: torch.Tensor)
expressive/experiments/rsbench/models/utils/utils_problog.py:910
Function
compute_logic_no_left_lane
(or_two_bits, pC)
expressive/experiments/rsbench/models/utils/utils_problog.py:958
Function
compute_logic_no_right
(or_three_bits, concepts: torch.Tensor)
expressive/experiments/rsbench/models/utils/utils_problog.py:934
Function
compute_logic_right
(or_three_bits, concepts: torch.Tensor)
expressive/experiments/rsbench/models/utils/utils_problog.py:946
Function
compute_logic_stop
(or_six_bits, concepts: torch.Tensor)
expressive/experiments/rsbench/models/utils/utils_problog.py:851
Method
compute_query_combine
Computes query probability given the worlds probability P(w). Args: self: instance query: query worlds_pr
expressive/experiments/rsbench/models/mnmathdpl.py:214
Function
concept_accuracy
Function which computes the concept accuracy Args: c1_prob (ndarray): first concept probability c2_prob (ndarray): second concept
expressive/experiments/rsbench/utils/metrics.py:1436
Method
cond_jump
( self, x_0: Tensor, x_t: Tensor, t: Union[float, Tensor], s: Union[float, Tensor] )
expressive/models/diffusion_model.py:69
Method
cond_jump
:param t: The current time step :param s: The timestep to jump to :param x_0: The x at timestep 0 :param x_t: The x a
expressive/models/diffusion_model.py:133
Method
cond_jump
( self, x_0: WY_DATA, x_t: WY_DATA, t: TimeSteps = None, s: TimeSteps = None )
expressive/models/diffusion_model.py:181
Method
conf_matrix_w
(index: int, name: str)
expressive/methods/logger.py:148
Method
conf_matrix_y
(index: int, name: str, class_names: list[str])
expressive/methods/logger.py:137
Function
cos_similarity
(clip_feats, target_feats, device="cuda")
expressive/experiments/rsbench/preprocessing/similarity.py:67
Function
cos_similarity_cubed
Substract mean from each vector, then raises to third power and compares cos similarity Does not modify any tensors in place
expressive/experiments/rsbench/preprocessing/similarity.py:27
Function
cos_similarity_cubed_single
Substract mean from each vector, then raises to third power and compares cos similarity Does not modify any tensors in place Only compare
expressive/experiments/rsbench/preprocessing/similarity.py:6
Method
create_dict
(self, iterations: int)
expressive/experiments/mnist_op/MNISTLog.py:9
Method
create_dict
(self, iterations: int)
expressive/methods/logger.py:46
Method
create_dict
(self, iterations: int)
expressive/methods/logger.py:104
Method
create_dict
(self, iterations: int)
expressive/methods/logger.py:134
Function
create_fake_stash
Create a fake stash, containing just the model name. This is used in general continual, as it is useless to backup a lightweight MNIST-360 training.
expressive/experiments/rsbench/utils/status.py:41
Function
create_if_not_exists
Creates the specified folder if it does not exist. Args: path: the complete path of the folder to be created Returns: None:
expressive/experiments/rsbench/utils/__init__.py:7
Function
create_load_ckpt
Method which creates checkpoint if it does not exists and loads it afterwards Args: model (nn.Module): model args: command line a
expressive/experiments/rsbench/utils/checkpoint.py:24
Function
create_stash
Creates the dictionary where to save the model status. Args: model: the model args: the current arguments dataset: the da
expressive/experiments/rsbench/utils/status.py:15
Function
define_experiment
(exp_folder, exp_class, params, exp_counter)
expressive/experiments/rsbench/models/utils/utils_problog.py:134
Method
define_herbrand_base
Defines the herbrand base to encode ProbLog worlds
expressive/experiments/rsbench/models/utils/deepproblog_modules.py:94
Method
diff
(f, concept_type)
expressive/experiments/rsbench/utils/kand_ltn_loss.py:113
Method
distribution
( self, x_t: DATA, encoding: Tensor, t: TimeSteps = None, s: TimeSteps
expressive/models/diffusion_model.py:255
Method
distribution
(self, wy_t: WY_DATA, x_encoding: Tensor, t: Tensor)
expressive/models/diffusion_model.py:359
Method
dtype
(self)
expressive/experiments/rsbench/preprocessing/clip/model.py:414
Method
encode
(self, x: Tensor)
expressive/models/diffusion_model.py:246
Method
encode_x
(self, x: Tensor)
expressive/experiments/rsbench/rsbenchmodel.py:28
Method
encode_x
(self, x: Tensor)
expressive/experiments/path_planning/absorbing_path.py:27
Method
encode_x
(self, x: Tensor)
expressive/experiments/mnist_op/absorbing_mnist.py:45
Function
entropy
Compute entropy given a probability distribution.
expressive/experiments/rsbench/utils/train.py:39
Function
eval_on_op_loader
( model: torch.nn.Module, mnistop_loader: DataLoader, n_operands: int, op: Callable[[list[torc
expressive/experiments/mnist_op/eval.py:59
Method
eval_y
(self, y_0_SBY: Tensor, y_0_BY: Tensor, w_0_BW: Tensor)
expressive/experiments/path_planning/absorbing_path.py:62
Function
expected_calibration_error_by_concept
Computes the ECE filtering by index Args: confs (ndarray): confidence preds (ndarray): predictions labels (ndarray): labe
expressive/experiments/rsbench/utils/metrics.py:1178
Function
extract_number_for_sorting
(filename)
expressive/experiments/rsbench/datasets/utils/kand_creation.py:22
Method
final_formula
(f1_s, f2_s, f3_s, f1_c, f2_c, f3_c)
expressive/experiments/rsbench/utils/kand_ltn_loss.py:180
Method
forward
Arguments: x: Tensor, shape ``[seq_len, batch_size, embedding_dim]``
expressive/util.py:123
← previous
next →
601–700 of 1,084, ranked by callers