MCPcopy Create free account

hub / github.com/Docta-ai/docta / functions

Functions186 in github.com/Docta-ai/docta

Method__init__
(self, cfg, dataset, model = None)
docta/apis/detect.py:102
Method__init__
(self, root_path, preprocess = None)
docta/datasets/csv_loder.py:7
Method__init__
(self, root, transform, target_transform=None)
docta/datasets/customize_img_folder.py:6
Method__init__
(self, cfg, train=True)
docta/datasets/hh_rlhf.py:9
Method__init__
(self, feature, label = None, index = None, preprocess = None)
docta/datasets/customize.py:4
Method__init__
(self, cfg, train = True, preprocess = None)
docta/datasets/cifar.py:23
Method__init__
(self, cfg, train = True, preprocess = None)
docta/datasets/cifar.py:111
Method__init__
(self, cfg, train=True, preprocess=None)
docta/datasets/cifar.py:192
Method__init__
(self, feature_dim, hidsizes=[1024, 512, 32], outputs=1, dropout=0., activation='relu')
docta/models/backbones/mlp.py:5
Method__init__
(self, in_planes, planes, stride=1)
docta/models/backbones/resnet_lowres.py:19
Method__init__
(self, in_planes, planes, stride=1)
docta/models/backbones/resnet_lowres.py:44
Method__init__
(self, inplanes, planes, stride=1, downsample=None, groups=1, base_width=64, dilation=1, norm
docta/models/backbones/resnet.py:37
Method__init__
(self, inplanes, planes, stride=1, downsample=None, groups=1, base_width=64, dilation=1, norm
docta/models/backbones/resnet.py:78
Method__init__
(self, T)
docta/models/loss_funcs/loss_correction.py:21
Method__init__
(self, alpha_plan = None)
docta/models/loss_funcs/peer_loss.py:8
Method__init__
Module to calculate the accuracy. Args: topk (tuple, optional): The criterion used to calculate the accuracy. Def
docta/models/loss_funcs/accuracy.py:53
Method__init__
CrossEntropyLoss. Args: use_sigmoid (bool, optional): Whether the prediction uses sigmoid of softmax. Defaults to
docta/models/loss_funcs/cross_entropy_loss.py:202
Method__iter__
(self)
docta/utils/config.py:589
Method__len__
(self)
docta/utils/config.py:570
Method__len__
(self)
docta/datasets/csv_loder.py:43
Method__len__
(self)
docta/datasets/customize_img_folder.py:33
Method__len__
(self)
docta/datasets/customize.py:27
Method__missing__
(self, name)
docta/utils/config.py:92
Method__repr__
(self)
docta/utils/config.py:567
Method__setitem__
(self, name, value)
docta/utils/config.py:584
Method__setstate__
(self, state)
docta/utils/config.py:612
Method_contain_invalid_identifier
(dict_str)
docta/utils/config.py:520
Method_format_basic_types
(k, v, use_mapping=False)
docta/utils/config.py:488
Method_format_dict
(input_dict, outest_level=False)
docta/utils/config.py:527
Method_format_list
(k, v, use_mapping=False)
docta/utils/config.py:503
Method_indent
(s_, num_spaces)
docta/utils/config.py:478
Methodauto_argparser
Generate argparser from config file automatically (experimental)
docta/utils/config.py:430
Functionbinary_cross_entropy
Calculate the binary CrossEntropy loss. Args: pred (torch.Tensor): The prediction with shape (N, 1) or (N, ). When the shape
docta/models/loss_funcs/cross_entropy_loss.py:86
Functioncross_entropy
Calculate the CrossEntropy loss. Args: pred (torch.Tensor): The prediction with shape (N, C), C is the number of classes.
docta/models/loss_funcs/cross_entropy_loss.py:13
Functiondataset_cfg
(all_datasets)
docta/utils/utils.py:3
Functiondegree_centrality_scores
( similarity_matrix, threshold=None, increase_power=True, )
docta/utils/LexRank.py:13
Methoddump
Dumps config into a file or returns a string representation of the config. If a file argument is given, saves the config to that file
docta/utils/config.py:618
Methodextra_repr
Extra repr.
docta/models/loss_funcs/cross_entropy_loss.py:251
Methodfilename
(self)
docta/utils/config.py:466
Methodfind_next_comma
Find the position of next comma in the string. If no ',' is found in the string, return the string length. All chars inside '
docta/utils/config.py:749
Methodforward
(self, x)
docta/models/backbones/mlp.py:30
Methodforward
(self, x)
docta/models/backbones/resnet_lowres.py:33
Methodforward
(self, x)
docta/models/backbones/resnet_lowres.py:60
Methodforward
(self, x)
docta/models/backbones/resnet_lowres.py:90
Methodforward
(self, x)
docta/models/backbones/resnet.py:55
Methodforward
(self, x)
docta/models/backbones/resnet.py:95
Methodforward
(self, x)
docta/models/backbones/resnet.py:213
Methodforward
(self, inputs, targets)
docta/models/loss_funcs/loss_correction.py:11
Methodforward
(self, inputs, targets)
docta/models/loss_funcs/loss_correction.py:25
Methodforward
(self, epoch, inputs, targets, inputs_peer = None, targets_peer = None)
docta/models/loss_funcs/peer_loss.py:13
Methodforward
(self, epoch, inputs, targets)
docta/models/loss_funcs/peer_loss.py:33
Methodforward
Forward function to calculate accuracy. Args: pred (torch.Tensor): Prediction of models. target (torch.Tensor): Targe
docta/models/loss_funcs/accuracy.py:67
Methodforward
Forward function. Args: cls_score (torch.Tensor): The prediction. label (torch.Tensor): The learning label of the pre
docta/models/loss_funcs/cross_entropy_loss.py:256
Methodfromstring
Generate config from config str. Args: cfg_str (str): Config str. file_format (str): Config file format corresponding
docta/utils/config.py:402
Functionload_csv
(path)
docta/datasets/data_utils.py:118
Functionload_dataset
(cfg, data_converter, data_loader)
docta/datasets/data_utils.py:160
Functionload_tsv
(path)
docta/datasets/data_utils.py:125
Functionmask_cross_entropy
Calculate the CrossEntropy loss for masks. Args: pred (torch.Tensor): The prediction with shape (N, C, *), C is the number of
docta/models/loss_funcs/cross_entropy_loss.py:149
Methodmerge_from_dict
Merge list into cfg_dict. Merge the dict parsed by MultipleKVAction into this cfg. Examples: >>> options = {'model.backb
docta/utils/config.py:656
Functiononehot
(df, cols)
docta/datasets/csv_loder.py:47
Methodpreprocess_rare_pattern
(self)
docta/core/preprocess.py:135
Methodpretty_text
(self)
docta/utils/config.py:474
Functionprint_dialogue
(dialogue)
tools/cure_red_team_rlhf.py:13
Functionprint_dialogue
(dialogue)
tools/cure_hh_rlhf.py:13
Functionprint_samples
(cfg, feature, label, indices)
docta/datasets/data_utils.py:102
Methodrare_score
(self)
docta/apis/detect.py:91
Functionreplace_cfg_vals
Replace the string "${key}" with the corresponding value. Replace the "${key}" with the value of ori_cfg.key in the config. And support repla
docta/utils/config.py:800
Functionresnet101
r"""ResNet-101 model from `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_ Args: pretrained (
docta/models/backbones/resnet.py:262
Functionresnet101_lowres
(num_classes)
docta/models/backbones/resnet_lowres.py:114
Functionresnet152
r"""ResNet-152 model from `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_ Args: pretrained (
docta/models/backbones/resnet.py:274
Functionresnet152_lowres
(num_classes)
docta/models/backbones/resnet_lowres.py:118
Functionresnet18
r"""ResNet-18 model from `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_ Args: pretrained (b
docta/models/backbones/resnet.py:226
Functionresnet34
r"""ResNet-34 model from `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_ Args: pretrained (b
docta/models/backbones/resnet.py:238
Functionresnet34_lowres
(num_classes)
docta/models/backbones/resnet_lowres.py:106
Functionresnet50
r"""ResNet-50 model from `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_ Args: pretrained (b
docta/models/backbones/resnet.py:250
Functionresnet50_lowres
(num_classes)
docta/models/backbones/resnet_lowres.py:110
Functionresnext101_32x8d
r"""ResNeXt-101 32x8d model from `"Aggregated Residual Transformation for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ Args
docta/models/backbones/resnet.py:300
Functionresnext50_32x4d
r"""ResNeXt-50 32x4d model from `"Aggregated Residual Transformation for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ Args:
docta/models/backbones/resnet.py:286
Functiontest
()
docta/models/backbones/resnet_lowres.py:122
Methodtext
(self)
docta/utils/config.py:470
Methodtoken_st
(sentences)
docta/core/preprocess.py:116
Functiontrain_model
(cfg, model, dataset, loss_func, test_dataset=None)
docta/apis/train.py:56
Functionweighted_loss
Create a weighted version of a given loss function. To use this decorator, the loss function must have the signature like `loss_func(pred, ta
docta/models/loss_funcs/loss_utils.py:10
Functionwide_resnet101_2
r"""Wide ResNet-101-2 model from `"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_ The model is the same as ResNet except fo
docta/models/backbones/resnet.py:332
Functionwide_resnet50_2
r"""Wide ResNet-50-2 model from `"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_ The model is the same as ResNet except for
docta/models/backbones/resnet.py:314
Functionwrapper
(pred, target, weight=None, reduction='mean',
docta/models/loss_funcs/loss_utils.py:42
← previous101–186 of 186, ranked by callers