MCPcopy Create free account

hub / github.com/M-Nauta/ProtoTree / functions

Functions180 in github.com/M-Nauta/ProtoTree

↓ 63 callersMethodlog_message
Write a message to the log file :param msg: the message string to be written to the log file
util/log.py:38
↓ 27 callersMethodsave
(self, directory_path: str)
prototree/prototree.py:273
↓ 22 callersMethoddistribution
(self)
prototree/leaf.py:64
↓ 12 callersMethodload
(directory_path: str)
prototree/prototree.py:294
↓ 8 callersMethodforward
(self, xs: torch.Tensor, **kwargs)
prototree/leaf.py:33
↓ 7 callersFunctioneval
(tree: ProtoTree, test_loader: DataLoader, epoch, device, log: Log = None,
prototree/test.py:15
↓ 6 callersMethodlog_values
Log values in an existent log file :param log_name: The name of the log file :param key: The key attribute for logging the
util/log.py:61
↓ 5 callersMethodsave_state
(self, directory_path: str)
prototree/prototree.py:281
↓ 4 callersMethod_make_layer
(self, block, planes, num_blocks, stride=1)
features/resnet_features.py:172
↓ 4 callersFunctionanalyse_leafs
(tree: ProtoTree, epoch: int, k: int, leaf_labels: dict, threshold: float, log: Log)
util/analyse.py:71
↓ 4 callersMethodforward_partial
(self, xs: torch.Tensor)
prototree/prototree.py:218
↓ 4 callersFunctionget_avg_path_length
(tree: ProtoTree, info: dict, log: Log)
util/analyse.py:10
↓ 3 callersMethod__init__
(self, num_input_features, growth_rate, bn_size, drop_rate)
features/densenet_features.py:22
↓ 3 callersFunctionacc_from_cm
Compute the accuracy from the confusion matrix :param cm: confusion matrix :return: the accuracy score
prototree/test.py:168
↓ 3 callersFunctionanalyse_leaf_distributions
(tree: ProtoTree, log: Log)
util/analyse.py:50
↓ 3 callersFunctionconv1x1
1x1 convolution
features/resnet_features.py:24
↓ 3 callersFunctionconv3x3
3x3 convolution with padding
features/resnet_features.py:18
↓ 3 callersMethodcreate_log
Create a csv for logging information :param log_name: The name of the log. The log filename will be <log_name>.csv. :param
util/log.py:46
↓ 3 callersFunctionget_args
()
util/args.py:13
↓ 3 callersFunctionget_dataloaders
Get data loaders
util/data.py:30
↓ 3 callersFunctionsave_args
Save the arguments in the specified directory as - a text file called 'args.txt' - a pickle file called 'args.pickle' :pa
util/args.py:157
↓ 3 callersFunctionsave_best_test_tree
(tree: ProtoTree, optimizer, scheduler, best_test_acc: float, test_acc: float, log: Log)
util/save.py:32
↓ 3 callersMethodsize
(self)
prototree/prototree.py:235
↓ 2 callersMethod__init__
(self, inplanes, planes, stride=1, downsample=None)
features/resnet_features.py:34
↓ 2 callersMethod__init__
(self, in_planes, out_planes, kernel_size=3, stride=1, groups=1)
features/mobilenet_features.py:9
↓ 2 callersFunctionaverage_distance_nearest_image
(project_info: dict, tree: ProtoTree, log: Log, disable_log = False)
util/analyse.py:38
↓ 2 callersMethodblock_conv_info
(self)
features/densenet_features.py:67
↓ 2 callersFunctionexplain_local
(args)
main_explain_local.py:51
↓ 2 callersFunctionfind_high_activation_crop
(mask,threshold)
prototree/upsample.py:98
↓ 2 callersFunctionimsave_with_bbox
(fname, img_rgb, bbox_height_start, bbox_height_end, bbox_width_start, bbox_width_end, c
prototree/upsample.py:120
↓ 2 callersFunctionrun_tree
(args=None)
main_tree.py:21
↓ 2 callersFunctionsave_tree_description
(tree: ProtoTree, optimizer, scheduler, description: str, log: Log)
util/save.py:42
↓ 2 callersFunctiontrain_leaves_epoch
(tree: ProtoTree, train_loader: DataLoader, epoch: int,
prototree/train.py:194
↓ 1 callersFunction_branch_vis
(node: Branch, upsample_dir: str)
util/visualize.py:78
↓ 1 callersFunction_gen_dot_edges
(node: Node, classes:tuple)
util/visualize.py:144
↓ 1 callersFunction_gen_dot_nodes
(node: Node, destination_folder: str, upsample_dir: str, classes:tuple)
util/visualize.py:115
↓ 1 callersMethod_init_tree
(self, num_classes, args: argparse.Namespace)
prototree/prototree.py:297
↓ 1 callersMethod_initialize_weights
(self)
features/vgg_features.py:44
↓ 1 callersFunction_leaf_vis
(node: Leaf)
util/visualize.py:45
↓ 1 callersMethod_make_layers
(self, cfg, batch_norm)
features/vgg_features.py:57
↓ 1 callersFunction_node_vis
(node: Node, upsample_dir: str)
util/visualize.py:38
↓ 1 callersMethod_set_parents
(self)
prototree/prototree.py:317
↓ 1 callersFunctionanalyse_ensemble
(log, args, test_loader, device, trained_orig_trees, trained_pruned_trees, trained_pruned_projected_trees, ori
util/analyse.py:119
↓ 1 callersFunctionanalyse_output_shape
(tree: ProtoTree, trainloader: DataLoader, log: Log, device)
util/analyse.py:61
↓ 1 callersMethodblock_conv_info
(self)
features/resnet_features.py:66
↓ 1 callersFunctiondensenet121_features
r"""Densenet-121 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
features/densenet_features.py:178
↓ 1 callersFunctiondensenet161_features
r"""Densenet-161 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
features/densenet_features.py:290
↓ 1 callersFunctiondensenet169_features
r"""Densenet-169 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
features/densenet_features.py:215
↓ 1 callersFunctiondensenet201_features
r"""Densenet-201 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
features/densenet_features.py:252
↓ 1 callersFunctioneval_ensemble
(trees: list, test_loader: DataLoader, device, log: Log, args: argparse.Namespace, sampling_strategy: str = 'd
prototree/test.py:128
↓ 1 callersFunctioneval_fidelity
(tree: ProtoTree, test_loader: DataLoader, device, log: Log = None, prog
prototree/test.py:73
↓ 1 callersMethodforward
Perform convolution over the input using the squared L2 distance for all prototypes in the layer :param xs: A batch of input images
util/l2conv.py:26
↓ 1 callersFunctionfreeze
(tree: ProtoTree, epoch: int, params_to_freeze: list, params_to_train: list, args: argparse.Namespace, log: Lo
util/net.py:52
↓ 1 callersMethodg
(self, xs: torch.Tensor, **kwargs)
prototree/branch.py:87
↓ 1 callersFunctiongen_pred_vis
(tree: ProtoTree, sample: torch.Tensor, sample_dir: str, fo
util/visualize_prediction.py:88
↓ 1 callersFunctiongen_vis
(tree: ProtoTree, folder_name: str, args: argparse.Namespace, classes:tuple)
util/visualize.py:16
↓ 1 callersFunctionget_birds
(augment: bool, train_dir:str, project_dir: str, test_dir:str, img_size = 224)
util/data.py:59
↓ 1 callersFunctionget_cars
(augment: bool, train_dir:str, project_dir: str, test_dir:str, img_size = 224)
util/data.py:93
↓ 1 callersFunctionget_data
Load the proper dataset based on the parsed arguments :param args: The arguments in which is specified which dataset should be used :r
util/data.py:13
↓ 1 callersFunctionget_local_expl_args
()
main_explain_local.py:12
↓ 1 callersFunctionget_milestones
(args: argparse.Namespace)
util/args.py:148
↓ 1 callersFunctionget_network
(num_in_channels: int, args: argparse.Namespace)
util/net.py:33
↓ 1 callersFunctionget_optimizer
Construct the optimizer as dictated by the parsed arguments :param tree: The tree that should be optimized :param args: Parsed argumen
util/args.py:190
↓ 1 callersFunctionget_similarity_maps
(tree: ProtoTree, project_info: dict, log: Log = None)
prototree/upsample.py:83
↓ 1 callersFunctionhas_max_prob_lower_threshold
(node: Node, threshold: float)
prototree/prune.py:19
↓ 1 callersFunctioninit_tree
(tree: ProtoTree, optimizer, scheduler, device, args: argparse.Namespace)
util/init.py:14
↓ 1 callersMethodlayer_conv_info
(self)
features/densenet_features.py:42
↓ 1 callersFunctionlog_learning_rates
(optimizer, args: argparse.Namespace, log: Log)
util/analyse.py:25
↓ 1 callersFunctionmin_pool2d
(xs, **kwargs)
util/func.py:6
↓ 1 callersFunctionnodes_to_prune_based_on_leaf_dists_threshold
(tree: ProtoTree, threshold: float)
prototree/prune.py:10
↓ 1 callersMethodnum_layers
the number of conv layers in the network
features/vgg_features.py:91
↓ 1 callersMethodnum_layers
(self)
features/densenet_features.py:170
↓ 1 callersMethodnum_layers
the number of conv layers in the network, not counting the number of bypass layers
features/resnet_features.py:213
↓ 1 callersMethodpath_to
(self, node: Node)
prototree/prototree.py:335
↓ 1 callersFunctionproject_with_class_constraints
(tree: ProtoTree, project_loader: DataLoader,
prototree/project.py:110
↓ 1 callersFunctionprune
(tree: ProtoTree, pruning_threshold_leaves: float, log: Log)
prototree/prune.py:41
↓ 1 callersFunctionresnet101_features
Constructs a ResNet-101 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/resnet_features.py:301
↓ 1 callersFunctionresnet152_features
Constructs a ResNet-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/resnet_features.py:315
↓ 1 callersFunctionresnet18_features
Constructs a ResNet-18 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/resnet_features.py:230
↓ 1 callersFunctionresnet34_features
Constructs a ResNet-34 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/resnet_features.py:244
↓ 1 callersFunctionresnet50_features
Constructs a ResNet-50 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/resnet_features.py:257
↓ 1 callersFunctionrun_ensemble
()
main_ensemble.py:16
↓ 1 callersFunctionsave_best_train_tree
(tree: ProtoTree, optimizer, scheduler, best_train_acc: float, train_acc: float, log: Log)
util/save.py:22
↓ 1 callersFunctionsave_tree
(tree: ProtoTree, optimizer, scheduler, epoch: int, log: Log, args: argparse.Namespace)
util/save.py:7
↓ 1 callersMethodsize
(self)
prototree/leaf.py:88
↓ 1 callersMethodsize
(self)
prototree/branch.py:94
↓ 1 callersFunctiontrain_epoch
(tree: ProtoTree, train_loader: DataLoader, optimizer: torch.optim.Optimizer
prototree/train.py:14
↓ 1 callersFunctiontrain_epoch_kontschieder
(tree: ProtoTree, train_loader: DataLoader, optimizer: torch.optim.Optimizer
prototree/train.py:110
↓ 1 callersFunctionupsample
(tree: ProtoTree, project_info: dict, project_loader: DataLoader, folder_name: str, args: argparse.Namespace,
prototree/upsample.py:14
↓ 1 callersFunctionupsample_local
(tree: ProtoTree, sample: torch.Tensor, sample_dir: str, fo
util/visualize_prediction.py:22
↓ 1 callersFunctionvgg11_bn_features
VGG 11-layer model (configuration "A") with batch normalization Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:125
↓ 1 callersFunctionvgg11_features
VGG 11-layer model (configuration "A") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:104
↓ 1 callersFunctionvgg13_bn_features
VGG 13-layer model (configuration "B") with batch normalization Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:167
↓ 1 callersFunctionvgg13_features
VGG 13-layer model (configuration "B") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:146
↓ 1 callersFunctionvgg16_bn_features
VGG 16-layer model (configuration "D") with batch normalization Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:209
↓ 1 callersFunctionvgg16_features
VGG 16-layer model (configuration "D") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:188
↓ 1 callersFunctionvgg19_bn_features
VGG 19-layer model (configuration 'E') with batch normalization Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:251
↓ 1 callersFunctionvgg19_features
VGG 19-layer model (configuration "E") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
features/vgg_features.py:230
Method__init__
(self, cfg, batch_norm=False, init_weights=True)
features/vgg_features.py:26
Method__init__
(self, num_layers, num_input_features, bn_size, growth_rate, drop_rate)
features/densenet_features.py:51
next →1–100 of 180, ranked by callers