SYMBOL INDEX (1180 symbols across 200 files) FILE: ML/Kaggles/DiabeticRetinopathy/dataset.py class DRDataset (line 10) | class DRDataset(Dataset): method __init__ (line 11) | def __init__(self, images_folder, path_to_csv, train=True, transform=N... method __len__ (line 19) | def __len__(self): method __getitem__ (line 22) | def __getitem__(self, index): FILE: ML/Kaggles/DiabeticRetinopathy/preprocess_images.py function trim (line 16) | def trim(im): function resize_maintain_aspect (line 38) | def resize_maintain_aspect(image, desired_size): function save_single (line 52) | def save_single(args): function fast_image_resize (line 60) | def fast_image_resize(input_path_folder, output_path_folder, output_size... FILE: ML/Kaggles/DiabeticRetinopathy/train.py function train_one_epoch (line 20) | def train_one_epoch(loader, model, optimizer, loss_fn, scaler, device): function main (line 48) | def main(): FILE: ML/Kaggles/DiabeticRetinopathy/train_blend.py function make_prediction (line 14) | def make_prediction(model, loader, file): class MyDataset (line 42) | class MyDataset(Dataset): method __init__ (line 43) | def __init__(self, csv_file): method __len__ (line 46) | def __len__(self): method __getitem__ (line 49) | def __getitem__(self, index): class MyModel (line 57) | class MyModel(nn.Module): method __init__ (line 58) | def __init__(self): method forward (line 73) | def forward(self, x): FILE: ML/Kaggles/DiabeticRetinopathy/utils.py function make_prediction (line 10) | def make_prediction(model, loader, output_csv="submission.csv"): function check_accuracy (line 35) | def check_accuracy(loader, model, device="cuda"): function save_checkpoint (line 73) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 78) | def load_checkpoint(checkpoint, model, optimizer, lr): function get_csv_for_blend (line 89) | def get_csv_for_blend(loader, model, output_csv_file): FILE: ML/Kaggles/Dog vs Cat Competition/dataset.py class CatDog (line 8) | class CatDog(Dataset): method __init__ (line 9) | def __init__(self, root, transform=None): method __len__ (line 15) | def __len__(self): method __getitem__ (line 18) | def __getitem__(self, index): FILE: ML/Kaggles/Dog vs Cat Competition/train.py function save_feature_vectors (line 15) | def save_feature_vectors(model, loader, output_size=(1, 1), file="trainb... function train_one_epoch (line 33) | def train_one_epoch(loader, model, loss_fn, optimizer, scaler): function main (line 51) | def main(): FILE: ML/Kaggles/Dog vs Cat Competition/utils.py function check_accuracy (line 14) | def check_accuracy( function save_checkpoint (line 54) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 59) | def load_checkpoint(checkpoint, model): function create_submission (line 64) | def create_submission(model, model_name, files_dir): function blending_ensemble_data (line 176) | def blending_ensemble_data(): FILE: ML/Kaggles/Facial Keypoint Detection Competition/dataset.py class FacialKeypointDataset (line 8) | class FacialKeypointDataset(Dataset): method __init__ (line 9) | def __init__(self, csv_file, train=True, transform=None): method __len__ (line 16) | def __len__(self): method __getitem__ (line 19) | def __getitem__(self, index): FILE: ML/Kaggles/Facial Keypoint Detection Competition/extract_images_from_csv.py function extract_images_from_csv (line 7) | def extract_images_from_csv(csv, column, save_folder, resize=(96, 96)): FILE: ML/Kaggles/Facial Keypoint Detection Competition/train.py function train_one_epoch (line 17) | def train_one_epoch(loader, model, optimizer, loss_fn, scaler, device): function main (line 40) | def main(): FILE: ML/Kaggles/Facial Keypoint Detection Competition/utils.py function get_submission (line 8) | def get_submission(loader, dataset, model_15, model_4): function get_rmse (line 40) | def get_rmse(loader, model, loss_fn, device): function save_checkpoint (line 58) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 63) | def load_checkpoint(checkpoint, model, optimizer, lr): FILE: ML/Kaggles/SantanderTransaction/dataset.py function get_data (line 7) | def get_data(): FILE: ML/Kaggles/SantanderTransaction/train.py class NN (line 11) | class NN(nn.Module): method __init__ (line 12) | def __init__(self, input_size, hidden_dim): method forward (line 18) | def forward(self, x): FILE: ML/Kaggles/SantanderTransaction/utils.py function get_predictions (line 5) | def get_predictions(loader, model, device): function get_submission (line 21) | def get_submission(model, loader, test_ids, device): FILE: ML/Projects/DeepSort/sort_w_attention.py class SortArray (line 19) | class SortArray(Dataset): method __init__ (line 20) | def __init__(self, batch_size, min_int, max_int, min_size, max_size): method __len__ (line 28) | def __len__(self): method __getitem__ (line 31) | def __getitem__(self, index): class Encoder (line 47) | class Encoder(nn.Module): method __init__ (line 48) | def __init__(self, hidden_size, num_layers): method forward (line 55) | def forward(self, x): class Decoder (line 65) | class Decoder(nn.Module): method __init__ (line 66) | def __init__(self, hidden_size, num_layers, units=100): method forward (line 76) | def forward(self, x, encoder_states, hidden, cell): class Seq2Seq (line 98) | class Seq2Seq(nn.Module): method __init__ (line 99) | def __init__(self, encoder, decoder): method forward (line 104) | def forward(self, source, target, teacher_force_ratio=0.5): FILE: ML/Projects/DeepSort/utils.py function ask_user (line 4) | def ask_user(): function sort_array (line 10) | def sort_array(encoder, decoder, device, arr=None): function save_checkpoint (line 65) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 70) | def load_checkpoint(checkpoint, model, optimizer): # , steps): FILE: ML/Projects/Exploring_MNIST/networks/googLeNet.py class Inception (line 6) | class Inception(nn.Module): method __init__ (line 7) | def __init__( method forward (line 32) | def forward(self, x): class GoogLeNet (line 41) | class GoogLeNet(nn.Module): method __init__ (line 42) | def __init__(self, img_channel): method forward (line 66) | def forward(self, x): class BasicConv2d (line 90) | class BasicConv2d(nn.Module): method __init__ (line 91) | def __init__(self, in_channels, out_channels, **kwargs): method forward (line 96) | def forward(self, x): function test (line 102) | def test(): FILE: ML/Projects/Exploring_MNIST/networks/lenet.py class LeNet (line 6) | class LeNet(nn.Module): method __init__ (line 7) | def __init__(self, in_channels, init_weights=True, num_classes=10): method forward (line 21) | def forward(self, x): method _initialize_weights (line 36) | def _initialize_weights(self): function test_lenet (line 53) | def test_lenet(): FILE: ML/Projects/Exploring_MNIST/networks/resnet.py class residual_template (line 5) | class residual_template(nn.Module): method __init__ (line 8) | def __init__(self, in_channels, out_channels, stride=1, identity_downs... method forward (line 29) | def forward(self, x): class ResNet (line 52) | class ResNet(nn.Module): method __init__ (line 53) | def __init__(self, residual_template, layers, image_channel, num_class... method _make_layer (line 90) | def _make_layer(self, residual_template, num_residuals_blocks, channel... method forward (line 116) | def forward(self, x): function ResNet50 (line 133) | def ResNet50(img_channel): function ResNet101 (line 137) | def ResNet101(img_channel): function ResNet152 (line 141) | def ResNet152(img_channel): function test (line 145) | def test(): FILE: ML/Projects/Exploring_MNIST/networks/vgg.py class VGG (line 54) | class VGG(nn.Module): method __init__ (line 55) | def __init__( method forward (line 79) | def forward(self, x): method _initialize_weights (line 86) | def _initialize_weights(self): method create_architecture (line 102) | def create_architecture(self, architecture): function test (line 132) | def test(): FILE: ML/Projects/Exploring_MNIST/train.py class Train_MNIST (line 19) | class Train_MNIST(object): method __init__ (line 20) | def __init__(self): method prepare_args (line 41) | def prepare_args(self): method prepare_transformations (line 120) | def prepare_transformations(self): method prepare_data (line 139) | def prepare_data(self, shuffle=True): method train (line 162) | def train(self): method choose_network (line 219) | def choose_network(self): method main (line 236) | def main(self): FILE: ML/Projects/Exploring_MNIST/utils/mnist_data.py class mnist_data (line 6) | class mnist_data(object): method __init__ (line 7) | def __init__( method download_data (line 27) | def download_data(self): method create_validationset (line 37) | def create_validationset(self, mnist_trainset): method main (line 66) | def main(self): FILE: ML/Projects/Exploring_MNIST/utils/utils.py function save_checkpoint (line 9) | def save_checkpoint(filename, model, optimizer, train_acc, epoch): function check_accuracy (line 23) | def check_accuracy(loader, model): function load_model (line 44) | def load_model(args, model, optimizer): class visdom_plotting (line 66) | class visdom_plotting(object): method __init__ (line 67) | def __init__(self): method create_plot (line 97) | def create_plot( FILE: ML/Projects/spam_classifier_naive_bayes/build_vocabulary.py function build_vocabulary (line 20) | def build_vocabulary(curr_email): FILE: ML/Projects/spam_classifier_naive_bayes/naivebayes.py class NaiveBayes (line 20) | class NaiveBayes: method __init__ (line 21) | def __init__(self, X, y): method fit (line 26) | def fit(self, X): method predict (line 38) | def predict(self, X): method density_function (line 50) | def density_function(self, x, mean, sigma): FILE: ML/Projects/text_generation_babynames/generating_names.py class RNN (line 32) | class RNN(nn.Module): method __init__ (line 33) | def __init__(self, input_size, hidden_size, num_layers, output_size): method forward (line 42) | def forward(self, x, hidden, cell): method init_hidden (line 48) | def init_hidden(self, batch_size): class Generator (line 54) | class Generator: method __init__ (line 55) | def __init__(self): method char_tensor (line 64) | def char_tensor(self, string): method get_random_batch (line 70) | def get_random_batch(self): method generate (line 83) | def generate(self, initial_str="A", predict_len=100, temperature=0.85): method train (line 108) | def train(self): FILE: ML/Pytorch/Basics/Imbalanced_classes/main.py function get_loader (line 46) | def get_loader(root_dir, batch_size): function main (line 78) | def main(): FILE: ML/Pytorch/Basics/albumentations_tutorial/full_pytorch_example.py class ImageFolder (line 12) | class ImageFolder(Dataset): method __init__ (line 13) | def __init__(self, root_dir, transform=None): method __len__ (line 24) | def __len__(self): method __getitem__ (line 27) | def __getitem__(self, index): FILE: ML/Pytorch/Basics/albumentations_tutorial/utils.py function visualize (line 9) | def visualize(image): function plot_examples (line 16) | def plot_examples(images, bboxes=None): function visualize_bbox (line 32) | def visualize_bbox(img, bbox, class_name, color=(255, 0, 0), thickness=5): FILE: ML/Pytorch/Basics/custom_dataset/custom_dataset.py class CatsAndDogsDataset (line 27) | class CatsAndDogsDataset(Dataset): method __init__ (line 28) | def __init__(self, csv_file, root_dir, transform=None): method __len__ (line 33) | def __len__(self): method __getitem__ (line 36) | def __getitem__(self, index): function check_accuracy (line 111) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/custom_dataset_txt/loader_customtext.py class Vocabulary (line 34) | class Vocabulary: method __init__ (line 35) | def __init__(self, freq_threshold): method __len__ (line 40) | def __len__(self): method tokenizer_eng (line 44) | def tokenizer_eng(text): method build_vocabulary (line 47) | def build_vocabulary(self, sentence_list): method numericalize (line 64) | def numericalize(self, text): class FlickrDataset (line 73) | class FlickrDataset(Dataset): method __init__ (line 74) | def __init__(self, root_dir, captions_file, transform=None, freq_thres... method __len__ (line 87) | def __len__(self): method __getitem__ (line 90) | def __getitem__(self, index): class MyCollate (line 105) | class MyCollate: method __init__ (line 106) | def __init__(self, pad_idx): method __call__ (line 109) | def __call__(self, batch): function get_loader (line 118) | def get_loader( FILE: ML/Pytorch/Basics/lightning_simple_CNN.py class CNNLightning (line 37) | class CNNLightning(pl.LightningModule): method __init__ (line 38) | def __init__(self, lr=3e-4, in_channels=1, num_classes=10): method training_step (line 61) | def training_step(self, batch, batch_idx): method training_epoch_end (line 75) | def training_epoch_end(self, outputs): method test_step (line 78) | def test_step(self, batch, batch_idx): method validation_step (line 86) | def validation_step(self, batch, batch_idx): method predict_step (line 94) | def predict_step(self, batch, batch_idx): method _common_step (line 99) | def _common_step(self, x, batch_idx): method configure_optimizers (line 106) | def configure_optimizers(self): class MNISTDataModule (line 111) | class MNISTDataModule(pl.LightningDataModule): method __init__ (line 112) | def __init__(self, batch_size=512): method setup (line 116) | def setup(self, stage): method train_dataloader (line 127) | def train_dataloader(self): method val_dataloader (line 135) | def val_dataloader(self): method test_dataloader (line 140) | def test_dataloader(self): class MyPrintingCallback (line 146) | class MyPrintingCallback(Callback): method on_train_start (line 147) | def on_train_start(self, trainer, pl_module): method on_train_end (line 150) | def on_train_end(self, trainer, pl_module): FILE: ML/Pytorch/Basics/pytorch_bidirectional_lstm.py class BRNN (line 39) | class BRNN(nn.Module): method __init__ (line 40) | def __init__(self, input_size, hidden_size, num_layers, num_classes): method forward (line 49) | def forward(self, x): function check_accuracy (line 98) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/pytorch_init_weights.py class CNN (line 21) | class CNN(nn.Module): method __init__ (line 22) | def __init__(self, in_channels, num_classes): method forward (line 42) | def forward(self, x): method initialize_weights (line 52) | def initialize_weights(self): FILE: ML/Pytorch/Basics/pytorch_loadsave.py function save_checkpoint (line 30) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 35) | def load_checkpoint(checkpoint, model, optimizer): function main (line 41) | def main(): FILE: ML/Pytorch/Basics/pytorch_lr_ratescheduler.py function check_accuracy (line 86) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/pytorch_mixed_precision_example.py class CNN (line 26) | class CNN(nn.Module): method __init__ (line 27) | def __init__(self, in_channels=1, num_classes=10): method forward (line 46) | def forward(self, x): function check_accuracy (line 108) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/pytorch_pretrain_finetune.py function check_accuracy (line 85) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/pytorch_rnn_gru_lstm.py class RNN (line 36) | class RNN(nn.Module): method __init__ (line 37) | def __init__(self, input_size, hidden_size, num_layers, num_classes): method forward (line 44) | def forward(self, x): class RNN_GRU (line 58) | class RNN_GRU(nn.Module): method __init__ (line 59) | def __init__(self, input_size, hidden_size, num_layers, num_classes): method forward (line 66) | def forward(self, x): class RNN_LSTM (line 80) | class RNN_LSTM(nn.Module): method __init__ (line 81) | def __init__(self, input_size, hidden_size, num_layers, num_classes): method forward (line 88) | def forward(self, x): function check_accuracy (line 140) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/pytorch_simple_CNN.py class CNN (line 28) | class CNN(nn.Module): method __init__ (line 29) | def __init__(self, in_channels=1, num_classes=10): method forward (line 48) | def forward(self, x): function check_accuracy (line 104) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/pytorch_simple_fullynet.py class NN (line 32) | class NN(nn.Module): method __init__ (line 33) | def __init__(self, input_size, num_classes): method forward (line 49) | def forward(self, x): function check_accuracy (line 117) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/pytorch_std_mean.py function get_mean_std (line 24) | def get_mean_std(loader): FILE: ML/Pytorch/Basics/pytorch_tensorboard_.py class CNN (line 27) | class CNN(nn.Module): method __init__ (line 28) | def __init__(self, in_channels=1, num_classes=10): method forward (line 39) | def forward(self, x): FILE: ML/Pytorch/Basics/pytorch_transforms.py class CNN (line 22) | class CNN(nn.Module): method __init__ (line 23) | def __init__(self, in_channels, num_classes): method forward (line 42) | def forward(self, x): function check_accuracy (line 120) | def check_accuracy(loader, model): FILE: ML/Pytorch/Basics/set_deterministic_behavior/pytorch_set_seeds.py function seed_everything (line 7) | def seed_everything(seed=42): FILE: ML/Pytorch/CNN_architectures/lenet5_pytorch.py class LeNet (line 13) | class LeNet(nn.Module): method __init__ (line 14) | def __init__(self): method forward (line 42) | def forward(self, x): function test_lenet (line 56) | def test_lenet(): FILE: ML/Pytorch/CNN_architectures/pytorch_efficientnet.py class CNNBlock (line 38) | class CNNBlock(nn.Module): method __init__ (line 39) | def __init__( method forward (line 55) | def forward(self, x): class SqueezeExcitation (line 59) | class SqueezeExcitation(nn.Module): method __init__ (line 60) | def __init__(self, in_channels, reduced_dim): method forward (line 70) | def forward(self, x): class InvertedResidualBlock (line 74) | class InvertedResidualBlock(nn.Module): method __init__ (line 75) | def __init__( method stochastic_depth (line 116) | def stochastic_depth(self, x): method forward (line 125) | def forward(self, inputs): class EfficientNet (line 134) | class EfficientNet(nn.Module): method __init__ (line 135) | def __init__(self, version, num_classes): method calculate_factors (line 146) | def calculate_factors(self, version, alpha=1.2, beta=1.1): method create_features (line 152) | def create_features(self, width_factor, depth_factor, last_channels): method forward (line 180) | def forward(self, x): function test (line 185) | def test(): FILE: ML/Pytorch/CNN_architectures/pytorch_inceptionet.py class GoogLeNet (line 13) | class GoogLeNet(nn.Module): method __init__ (line 14) | def __init__(self, aux_logits=True, num_classes=1000): method forward (line 58) | def forward(self, x): class Inception_block (line 97) | class Inception_block(nn.Module): method __init__ (line 98) | def __init__( method forward (line 119) | def forward(self, x): class InceptionAux (line 125) | class InceptionAux(nn.Module): method __init__ (line 126) | def __init__(self, in_channels, num_classes): method forward (line 135) | def forward(self, x): class conv_block (line 145) | class conv_block(nn.Module): method __init__ (line 146) | def __init__(self, in_channels, out_channels, **kwargs): method forward (line 152) | def forward(self, x): FILE: ML/Pytorch/CNN_architectures/pytorch_resnet.py class block (line 17) | class block(nn.Module): method __init__ (line 18) | def __init__( method forward (line 54) | def forward(self, x): class ResNet (line 74) | class ResNet(nn.Module): method __init__ (line 75) | def __init__(self, block, layers, image_channels, num_classes): method forward (line 102) | def forward(self, x): method _make_layer (line 118) | def _make_layer(self, block, num_residual_blocks, intermediate_channel... function ResNet50 (line 153) | def ResNet50(img_channel=3, num_classes=1000): function ResNet101 (line 157) | def ResNet101(img_channel=3, num_classes=1000): function ResNet152 (line 161) | def ResNet152(img_channel=3, num_classes=1000): function test (line 165) | def test(): FILE: ML/Pytorch/CNN_architectures/pytorch_vgg_implementation.py class VGG_net (line 62) | class VGG_net(nn.Module): method __init__ (line 63) | def __init__(self, in_channels=3, num_classes=1000): method forward (line 78) | def forward(self, x): method create_conv_layers (line 84) | def create_conv_layers(self, architecture): FILE: ML/Pytorch/GANs/1. SimpleGAN/fc_gan.py class Discriminator (line 20) | class Discriminator(nn.Module): method __init__ (line 21) | def __init__(self, in_features): method forward (line 30) | def forward(self, x): class Generator (line 34) | class Generator(nn.Module): method __init__ (line 35) | def __init__(self, z_dim, img_dim): method forward (line 44) | def forward(self, x): FILE: ML/Pytorch/GANs/2. DCGAN/model.py class Discriminator (line 13) | class Discriminator(nn.Module): method __init__ (line 14) | def __init__(self, channels_img, features_d): method _block (line 29) | def _block(self, in_channels, out_channels, kernel_size, stride, paddi... method forward (line 43) | def forward(self, x): class Generator (line 47) | class Generator(nn.Module): method __init__ (line 48) | def __init__(self, channels_noise, channels_img, features_g): method _block (line 63) | def _block(self, in_channels, out_channels, kernel_size, stride, paddi... method forward (line 77) | def forward(self, x): function initialize_weights (line 81) | def initialize_weights(model): function test (line 88) | def test(): FILE: ML/Pytorch/GANs/3. WGAN/model.py class Discriminator (line 15) | class Discriminator(nn.Module): method __init__ (line 16) | def __init__(self, channels_img, features_d): method _block (line 32) | def _block(self, in_channels, out_channels, kernel_size, stride, paddi... method forward (line 46) | def forward(self, x): class Generator (line 50) | class Generator(nn.Module): method __init__ (line 51) | def __init__(self, channels_noise, channels_img, features_g): method _block (line 66) | def _block(self, in_channels, out_channels, kernel_size, stride, paddi... method forward (line 80) | def forward(self, x): function initialize_weights (line 84) | def initialize_weights(model): function test (line 91) | def test(): FILE: ML/Pytorch/GANs/4. WGAN-GP/model.py class Discriminator (line 13) | class Discriminator(nn.Module): method __init__ (line 14) | def __init__(self, channels_img, features_d): method _block (line 28) | def _block(self, in_channels, out_channels, kernel_size, stride, paddi... method forward (line 42) | def forward(self, x): class Generator (line 46) | class Generator(nn.Module): method __init__ (line 47) | def __init__(self, channels_noise, channels_img, features_g): method _block (line 62) | def _block(self, in_channels, out_channels, kernel_size, stride, paddi... method forward (line 76) | def forward(self, x): function initialize_weights (line 80) | def initialize_weights(model): function test (line 87) | def test(): FILE: ML/Pytorch/GANs/4. WGAN-GP/utils.py function gradient_penalty (line 5) | def gradient_penalty(critic, real, fake, device="cpu"): function save_checkpoint (line 27) | def save_checkpoint(state, filename="celeba_wgan_gp.pth.tar"): function load_checkpoint (line 32) | def load_checkpoint(checkpoint, gen, disc): FILE: ML/Pytorch/GANs/CycleGAN/dataset.py class HorseZebraDataset (line 6) | class HorseZebraDataset(Dataset): method __init__ (line 7) | def __init__(self, root_zebra, root_horse, transform=None): method __len__ (line 18) | def __len__(self): method __getitem__ (line 21) | def __getitem__(self, index): FILE: ML/Pytorch/GANs/CycleGAN/discriminator_model.py class Block (line 13) | class Block(nn.Module): method __init__ (line 14) | def __init__(self, in_channels, out_channels, stride): method forward (line 30) | def forward(self, x): class Discriminator (line 34) | class Discriminator(nn.Module): method __init__ (line 35) | def __init__(self, in_channels=3, features=[64, 128, 256, 512]): method forward (line 68) | def forward(self, x): function test (line 73) | def test(): FILE: ML/Pytorch/GANs/CycleGAN/generator_model.py class ConvBlock (line 13) | class ConvBlock(nn.Module): method __init__ (line 14) | def __init__(self, in_channels, out_channels, down=True, use_act=True,... method forward (line 24) | def forward(self, x): class ResidualBlock (line 28) | class ResidualBlock(nn.Module): method __init__ (line 29) | def __init__(self, channels): method forward (line 36) | def forward(self, x): class Generator (line 40) | class Generator(nn.Module): method __init__ (line 41) | def __init__(self, img_channels, num_features=64, num_residuals=9): method forward (line 104) | def forward(self, x): function test (line 114) | def test(): FILE: ML/Pytorch/GANs/CycleGAN/train.py function train_fn (line 23) | def train_fn( function main (line 102) | def main(): FILE: ML/Pytorch/GANs/CycleGAN/utils.py function save_checkpoint (line 6) | def save_checkpoint(model, optimizer, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 15) | def load_checkpoint(checkpoint_file, model, optimizer, lr): function seed_everything (line 27) | def seed_everything(seed=42): FILE: ML/Pytorch/GANs/ESRGAN/dataset.py class MyImageFolder (line 13) | class MyImageFolder(Dataset): method __init__ (line 14) | def __init__(self, root_dir): method __len__ (line 24) | def __len__(self): method __getitem__ (line 27) | def __getitem__(self, index): function test (line 39) | def test(): FILE: ML/Pytorch/GANs/ESRGAN/loss.py class VGGLoss (line 6) | class VGGLoss(nn.Module): method __init__ (line 7) | def __init__(self): method forward (line 16) | def forward(self, input, target): FILE: ML/Pytorch/GANs/ESRGAN/model.py class ConvBlock (line 5) | class ConvBlock(nn.Module): method __init__ (line 6) | def __init__(self, in_channels, out_channels, use_act, **kwargs): method forward (line 16) | def forward(self, x): class UpsampleBlock (line 20) | class UpsampleBlock(nn.Module): method __init__ (line 21) | def __init__(self, in_c, scale_factor=2): method forward (line 27) | def forward(self, x): class DenseResidualBlock (line 31) | class DenseResidualBlock(nn.Module): method __init__ (line 32) | def __init__(self, in_channels, channels=32, residual_beta=0.2): method forward (line 49) | def forward(self, x): class RRDB (line 57) | class RRDB(nn.Module): method __init__ (line 58) | def __init__(self, in_channels, residual_beta=0.2): method forward (line 63) | def forward(self, x): class Generator (line 67) | class Generator(nn.Module): method __init__ (line 68) | def __init__(self, in_channels=3, num_channels=64, num_blocks=23): method forward (line 89) | def forward(self, x): class Discriminator (line 96) | class Discriminator(nn.Module): method __init__ (line 97) | def __init__(self, in_channels=3, features=[64, 64, 128, 128, 256, 256... method forward (line 122) | def forward(self, x): function initialize_weights (line 126) | def initialize_weights(model, scale=0.1): function test (line 137) | def test(): FILE: ML/Pytorch/GANs/ESRGAN/train.py function train_fn (line 15) | def train_fn( function main (line 78) | def main(): FILE: ML/Pytorch/GANs/ESRGAN/utils.py function gradient_penalty (line 9) | def gradient_penalty(critic, real, fake, device): function save_checkpoint (line 32) | def save_checkpoint(model, optimizer, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 41) | def load_checkpoint(checkpoint_file, model, optimizer, lr): function plot_examples (line 54) | def plot_examples(low_res_folder, gen): FILE: ML/Pytorch/GANs/Pix2Pix/dataset.py class MapDataset (line 9) | class MapDataset(Dataset): method __init__ (line 10) | def __init__(self, root_dir): method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, index): FILE: ML/Pytorch/GANs/Pix2Pix/discriminator_model.py class CNNBlock (line 5) | class CNNBlock(nn.Module): method __init__ (line 6) | def __init__(self, in_channels, out_channels, stride): method forward (line 16) | def forward(self, x): class Discriminator (line 20) | class Discriminator(nn.Module): method __init__ (line 21) | def __init__(self, in_channels=3, features=[64, 128, 256, 512]): method forward (line 51) | def forward(self, x, y): function test (line 58) | def test(): FILE: ML/Pytorch/GANs/Pix2Pix/generator_model.py class Block (line 5) | class Block(nn.Module): method __init__ (line 6) | def __init__(self, in_channels, out_channels, down=True, act="relu", u... method forward (line 20) | def forward(self, x): class Generator (line 25) | class Generator(nn.Module): method __init__ (line 26) | def __init__(self, in_channels=3, features=64): method forward (line 74) | def forward(self, x): function test (line 93) | def test(): FILE: ML/Pytorch/GANs/Pix2Pix/train.py function train_fn (line 16) | def train_fn( function main (line 58) | def main(): FILE: ML/Pytorch/GANs/Pix2Pix/utils.py function save_some_examples (line 5) | def save_some_examples(gen, val_loader, epoch, folder): function save_checkpoint (line 19) | def save_checkpoint(model, optimizer, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 28) | def load_checkpoint(checkpoint_file, model, optimizer, lr): FILE: ML/Pytorch/GANs/ProGAN/model.py class WSConv2d (line 28) | class WSConv2d(nn.Module): method __init__ (line 38) | def __init__( method forward (line 51) | def forward(self, x): class PixelNorm (line 55) | class PixelNorm(nn.Module): method __init__ (line 56) | def __init__(self): method forward (line 60) | def forward(self, x): class ConvBlock (line 64) | class ConvBlock(nn.Module): method __init__ (line 65) | def __init__(self, in_channels, out_channels, use_pixelnorm=True): method forward (line 73) | def forward(self, x): class Generator (line 81) | class Generator(nn.Module): method __init__ (line 82) | def __init__(self, z_dim, in_channels, img_channels=3): method fade_in (line 113) | def fade_in(self, alpha, upscaled, generated): method forward (line 117) | def forward(self, x, alpha, steps): class Discriminator (line 136) | class Discriminator(nn.Module): method __init__ (line 137) | def __init__(self, z_dim, in_channels, img_channels=3): method fade_in (line 175) | def fade_in(self, alpha, downscaled, out): method minibatch_std (line 180) | def minibatch_std(self, x): method forward (line 189) | def forward(self, x, alpha, steps): FILE: ML/Pytorch/GANs/ProGAN/train.py function get_loader (line 24) | def get_loader(image_size): function train_fn (line 48) | def train_fn( function main (line 124) | def main(): FILE: ML/Pytorch/GANs/ProGAN/utils.py function plot_to_tensorboard (line 12) | def plot_to_tensorboard( function gradient_penalty (line 25) | def gradient_penalty(critic, real, fake, alpha, train_step, device="cpu"): function save_checkpoint (line 48) | def save_checkpoint(model, optimizer, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 57) | def load_checkpoint(checkpoint_file, model, optimizer, lr): function seed_everything (line 68) | def seed_everything(seed=42): function generate_examples (line 78) | def generate_examples(gen, steps, truncation=0.7, n=100): FILE: ML/Pytorch/GANs/SRGAN/dataset.py class MyImageFolder (line 8) | class MyImageFolder(Dataset): method __init__ (line 9) | def __init__(self, root_dir): method __len__ (line 19) | def __len__(self): method __getitem__ (line 22) | def __getitem__(self, index): function test (line 33) | def test(): FILE: ML/Pytorch/GANs/SRGAN/loss.py class VGGLoss (line 7) | class VGGLoss(nn.Module): method __init__ (line 8) | def __init__(self): method forward (line 16) | def forward(self, input, target): FILE: ML/Pytorch/GANs/SRGAN/model.py class ConvBlock (line 5) | class ConvBlock(nn.Module): method __init__ (line 6) | def __init__( method forward (line 25) | def forward(self, x): class UpsampleBlock (line 29) | class UpsampleBlock(nn.Module): method __init__ (line 30) | def __init__(self, in_c, scale_factor): method forward (line 36) | def forward(self, x): class ResidualBlock (line 40) | class ResidualBlock(nn.Module): method __init__ (line 41) | def __init__(self, in_channels): method forward (line 59) | def forward(self, x): class Generator (line 65) | class Generator(nn.Module): method __init__ (line 66) | def __init__(self, in_channels=3, num_channels=64, num_blocks=16): method forward (line 74) | def forward(self, x): class Discriminator (line 82) | class Discriminator(nn.Module): method __init__ (line 83) | def __init__(self, in_channels=3, features=[64, 64, 128, 128, 256, 256... method forward (line 110) | def forward(self, x): function test (line 114) | def test(): FILE: ML/Pytorch/GANs/SRGAN/train.py function train_fn (line 15) | def train_fn(loader, disc, gen, opt_gen, opt_disc, mse, bce, vgg_loss): function main (line 51) | def main(): FILE: ML/Pytorch/GANs/SRGAN/utils.py function gradient_penalty (line 9) | def gradient_penalty(critic, real, fake, device): function save_checkpoint (line 32) | def save_checkpoint(model, optimizer, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 41) | def load_checkpoint(checkpoint_file, model, optimizer, lr): function plot_examples (line 53) | def plot_examples(low_res_folder, gen): FILE: ML/Pytorch/GANs/StyleGAN/model.py class PixelNorm (line 8) | class PixelNorm(nn.Module): method __init__ (line 9) | def __init__(self): method forward (line 13) | def forward(self, x): class MappingNetwork (line 17) | class MappingNetwork(nn.Module): method __init__ (line 18) | def __init__(self, z_dim, w_dim): method forward (line 39) | def forward(self, x): class InjectNoise (line 43) | class InjectNoise(nn.Module): method __init__ (line 44) | def __init__(self, channels): method forward (line 48) | def forward(self, x): class AdaIN (line 52) | class AdaIN(nn.Module): method __init__ (line 53) | def __init__(self, channels, w_dim): method forward (line 59) | def forward(self, x, w): class WSConv2d (line 66) | class WSConv2d(nn.Module): method __init__ (line 67) | def __init__( method forward (line 80) | def forward(self, x): class WSLinear (line 84) | class WSLinear(nn.Module): method __init__ (line 85) | def __init__( method forward (line 98) | def forward(self, x): class GenBlock (line 102) | class GenBlock(nn.Module): method __init__ (line 103) | def __init__(self, in_channels, out_channels, w_dim): method forward (line 113) | def forward(self, x, w): class ConvBlock (line 118) | class ConvBlock(nn.Module): method __init__ (line 119) | def __init__(self, in_channels, out_channels): method forward (line 125) | def forward(self, x): class Generator (line 131) | class Generator(nn.Module): method __init__ (line 132) | def __init__(self, z_dim, w_dim, in_channels, img_channels=3): method fade_in (line 159) | def fade_in(self, alpha, upscaled, generated): method forward (line 163) | def forward(self, noise, alpha, steps): class Discriminator (line 185) | class Discriminator(nn.Module): method __init__ (line 186) | def __init__(self, in_channels, img_channels=3): method fade_in (line 224) | def fade_in(self, alpha, downscaled, out): method minibatch_std (line 229) | def minibatch_std(self, x): method forward (line 238) | def forward(self, x, alpha, steps): FILE: ML/Pytorch/GANs/StyleGAN/prepare_data.py function resize (line 8) | def resize(file, size, folder_to_save): FILE: ML/Pytorch/GANs/StyleGAN/train.py function get_loader (line 24) | def get_loader(image_size): function train_fn (line 48) | def train_fn( function main (line 132) | def main(): FILE: ML/Pytorch/GANs/StyleGAN/utils.py function plot_to_tensorboard (line 10) | def plot_to_tensorboard( function gradient_penalty (line 23) | def gradient_penalty(critic, real, fake, alpha, train_step, device="cpu"): function save_checkpoint (line 46) | def save_checkpoint(model, optimizer, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 55) | def load_checkpoint(checkpoint_file, model, optimizer, lr): function seed_everything (line 67) | def seed_everything(seed=42): class EMA (line 78) | class EMA: method __init__ (line 81) | def __init__(self, gamma=0.99, save=True, save_frequency=100, save_fil... method register_weights (line 99) | def register_weights(self, model): method __call__ (line 108) | def __call__(self, model): method copy_weights_to (line 118) | def copy_weights_to(self, model): method save_ema_weights (line 123) | def save_ema_weights(self): FILE: ML/Pytorch/huggingface/dataset.py class cnn_dailymail (line 7) | class cnn_dailymail(Dataset): method __init__ (line 8) | def __init__(self, csv_file, tokenizer, max_length=512): method __len__ (line 18) | def __len__(self): method __getitem__ (line 21) | def __getitem__(self, idx): class MyDataModule (line 47) | class MyDataModule(pl.LightningDataModule): method __init__ (line 48) | def __init__( method setup (line 59) | def setup(self, stage=None): method train_dataloader (line 72) | def train_dataloader(self): method val_dataloader (line 81) | def val_dataloader(self): method test_dataloader (line 86) | def test_dataloader(self): FILE: ML/Pytorch/huggingface/learninghugg.py function tokenize_function (line 10) | def tokenize_function(example): function compute_metrics (line 24) | def compute_metrics(eval_preds): FILE: ML/Pytorch/huggingface/model.py class MyLightningModule (line 16) | class MyLightningModule(pl.LightningModule): method __init__ (line 17) | def __init__(self, model_name, learning_rate, weight_decay): method forward (line 40) | def forward(self, input_ids, attention_mask, labels=None): method training_step (line 48) | def training_step(self, batch, batch_idx): method validation_step (line 56) | def validation_step(self, batch, batch_idx): method on_validation_epoch_end (line 69) | def on_validation_epoch_end(self): method predict (line 95) | def predict(self, article: str, max_input_length: int = 512, max_outpu... method configure_optimizers (line 124) | def configure_optimizers(self): FILE: ML/Pytorch/image_segmentation/semantic_segmentation_unet/dataset.py class CarvanaDataset (line 6) | class CarvanaDataset(Dataset): method __init__ (line 7) | def __init__(self, image_dir, mask_dir, transform=None): method __len__ (line 13) | def __len__(self): method __getitem__ (line 16) | def __getitem__(self, index): FILE: ML/Pytorch/image_segmentation/semantic_segmentation_unet/model.py class DoubleConv (line 5) | class DoubleConv(nn.Module): method __init__ (line 6) | def __init__(self, in_channels, out_channels): method forward (line 17) | def forward(self, x): class UNET (line 20) | class UNET(nn.Module): method __init__ (line 21) | def __init__( method forward (line 46) | def forward(self, x): function test (line 69) | def test(): FILE: ML/Pytorch/image_segmentation/semantic_segmentation_unet/train.py function train_fn (line 31) | def train_fn(loader, model, optimizer, loss_fn, scaler): function main (line 53) | def main(): FILE: ML/Pytorch/image_segmentation/semantic_segmentation_unet/utils.py function save_checkpoint (line 6) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 10) | def load_checkpoint(checkpoint, model): function get_loaders (line 14) | def get_loaders( function check_accuracy (line 55) | def check_accuracy(loader, model, device="cuda"): function save_predictions_as_imgs (line 79) | def save_predictions_as_imgs( FILE: ML/Pytorch/more_advanced/Seq2Seq/seq2seq.py function tokenize_ger (line 16) | def tokenize_ger(text): function tokenize_eng (line 20) | def tokenize_eng(text): class Encoder (line 38) | class Encoder(nn.Module): method __init__ (line 39) | def __init__(self, input_size, embedding_size, hidden_size, num_layers... method forward (line 48) | def forward(self, x): class Decoder (line 60) | class Decoder(nn.Module): method __init__ (line 61) | def __init__( method forward (line 73) | def forward(self, x, hidden, cell): class Seq2Seq (line 94) | class Seq2Seq(nn.Module): method __init__ (line 95) | def __init__(self, encoder, decoder): method forward (line 100) | def forward(self, source, target, teacher_force_ratio=0.5): FILE: ML/Pytorch/more_advanced/Seq2Seq/utils.py function translate_sentence (line 7) | def translate_sentence(model, sentence, german, english, device, max_len... function bleu (line 59) | def bleu(data, model, german, english, device): function save_checkpoint (line 76) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 81) | def load_checkpoint(checkpoint, model, optimizer): FILE: ML/Pytorch/more_advanced/Seq2Seq_attention/seq2seq_attention.py function tokenize_ger (line 21) | def tokenize_ger(text): function tokenize_eng (line 25) | def tokenize_eng(text): class Encoder (line 43) | class Encoder(nn.Module): method __init__ (line 44) | def __init__(self, input_size, embedding_size, hidden_size, num_layers... method forward (line 56) | def forward(self, x): class Decoder (line 74) | class Decoder(nn.Module): method __init__ (line 75) | def __init__( method forward (line 91) | def forward(self, x, encoder_states, hidden, cell): class Seq2Seq (line 125) | class Seq2Seq(nn.Module): method __init__ (line 126) | def __init__(self, encoder, decoder): method forward (line 131) | def forward(self, source, target, teacher_force_ratio=0.5): FILE: ML/Pytorch/more_advanced/Seq2Seq_attention/utils.py function translate_sentence (line 7) | def translate_sentence(model, sentence, german, english, device, max_len... function bleu (line 54) | def bleu(data, model, german, english, device): function save_checkpoint (line 71) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 76) | def load_checkpoint(checkpoint, model, optimizer): FILE: ML/Pytorch/more_advanced/VAE/lightning_vae/dataset.py class MNISTDataModule (line 9) | class MNISTDataModule(pl.LightningDataModule): method __init__ (line 10) | def __init__(self, batch_size, num_workers): method setup (line 15) | def setup(self, stage): method train_dataloader (line 26) | def train_dataloader(self): method val_dataloader (line 35) | def val_dataloader(self): method test_dataloader (line 44) | def test_dataloader(self): FILE: ML/Pytorch/more_advanced/VAE/lightning_vae/model.py class VAEpl (line 7) | class VAEpl(pl.LightningModule): method __init__ (line 8) | def __init__(self, lr, input_dim=784, h_dim=200, z_dim=20): method encode (line 25) | def encode(self, x): method decode (line 30) | def decode(self, z): method forward (line 34) | def forward(self, x): method training_step (line 41) | def training_step(self, batch, batch_idx): method validation_step (line 62) | def validation_step(self, batch, batch_idx): method test_step (line 72) | def test_step(self, batch, batch_idx): method configure_optimizers (line 82) | def configure_optimizers(self): FILE: ML/Pytorch/more_advanced/VAE/lightning_vae/utils.py function inference (line 8) | def inference(model, dataset, digit, num_examples=1): FILE: ML/Pytorch/more_advanced/VAE/model.py class VariationalAutoEncoder (line 5) | class VariationalAutoEncoder(nn.Module): method __init__ (line 6) | def __init__(self, input_dim, h_dim=200, z_dim=20): method encode (line 19) | def encode(self, x): method decode (line 24) | def decode(self, z): method forward (line 28) | def forward(self, x): FILE: ML/Pytorch/more_advanced/VAE/train.py function inference (line 27) | def inference(digit, num_examples=1): FILE: ML/Pytorch/more_advanced/finetuning_whisper/dataset.py class CommonVoice (line 16) | class CommonVoice(Dataset): method __init__ (line 17) | def __init__(self, data_dir, whisper_model="tiny"): method __len__ (line 31) | def __len__(self): method __getitem__ (line 34) | def __getitem__(self, idx): class DataCollatorSpeechSeq2SeqWithPadding (line 59) | class DataCollatorSpeechSeq2SeqWithPadding: method __init__ (line 60) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 64) | def __call__(self, batch): class WhisperDataset (line 89) | class WhisperDataset(pl.LightningDataModule): method __init__ (line 90) | def __init__(self, data_dir, batch_size=32, num_workers=0, whisper_mod... method setup (line 98) | def setup(self, stage=None): method train_dataloader (line 104) | def train_dataloader(self): FILE: ML/Pytorch/more_advanced/finetuning_whisper/model.py class WhisperFinetuning (line 9) | class WhisperFinetuning(pl.LightningModule): method __init__ (line 10) | def __init__(self, lr, whisper_model="tiny"): method training_step (line 17) | def training_step(self, batch, batch_idx): method configure_optimizers (line 28) | def configure_optimizers(self): FILE: ML/Pytorch/more_advanced/finetuning_whisper/whisper.py function prepare_dataset (line 69) | def prepare_dataset(example): class DataCollatorSpeechSeq2SeqWithPadding (line 87) | class DataCollatorSpeechSeq2SeqWithPadding: method __call__ (line 90) | def __call__( function compute_metrics (line 126) | def compute_metrics(pred): FILE: ML/Pytorch/more_advanced/image_captioning/get_loader.py class Vocabulary (line 22) | class Vocabulary: method __init__ (line 23) | def __init__(self, freq_threshold): method __len__ (line 28) | def __len__(self): method tokenizer_eng (line 32) | def tokenizer_eng(text): method build_vocabulary (line 35) | def build_vocabulary(self, sentence_list): method numericalize (line 52) | def numericalize(self, text): class FlickrDataset (line 61) | class FlickrDataset(Dataset): method __init__ (line 62) | def __init__(self, root_dir, captions_file, transform=None, freq_thres... method __len__ (line 75) | def __len__(self): method __getitem__ (line 78) | def __getitem__(self, index): class MyCollate (line 93) | class MyCollate: method __init__ (line 94) | def __init__(self, pad_idx): method __call__ (line 97) | def __call__(self, batch): function get_loader (line 106) | def get_loader( FILE: ML/Pytorch/more_advanced/image_captioning/model.py class EncoderCNN (line 7) | class EncoderCNN(nn.Module): method __init__ (line 8) | def __init__(self, embed_size, train_CNN=False): method forward (line 17) | def forward(self, images): class DecoderRNN (line 22) | class DecoderRNN(nn.Module): method __init__ (line 23) | def __init__(self, embed_size, hidden_size, vocab_size, num_layers): method forward (line 30) | def forward(self, features, captions): class CNNtoRNN (line 38) | class CNNtoRNN(nn.Module): method __init__ (line 39) | def __init__(self, embed_size, hidden_size, vocab_size, num_layers): method forward (line 44) | def forward(self, images, captions): method caption_image (line 49) | def caption_image(self, image, vocabulary, max_length=50): FILE: ML/Pytorch/more_advanced/image_captioning/train.py function train (line 12) | def train(): FILE: ML/Pytorch/more_advanced/image_captioning/utils.py function print_examples (line 6) | def print_examples(model, device, dataset): function save_checkpoint (line 59) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 64) | def load_checkpoint(checkpoint, model, optimizer): FILE: ML/Pytorch/more_advanced/neuralstyle/nst.py class VGG (line 10) | class VGG(nn.Module): method __init__ (line 11) | def __init__(self): method forward (line 24) | def forward(self, x): function load_image (line 40) | def load_image(image_name): FILE: ML/Pytorch/more_advanced/seq2seq_transformer/seq2seq_transformer.py function tokenize_ger (line 31) | def tokenize_ger(text): function tokenize_eng (line 35) | def tokenize_eng(text): class Transformer (line 53) | class Transformer(nn.Module): method __init__ (line 54) | def __init__( method make_src_mask (line 87) | def make_src_mask(self, src): method forward (line 93) | def forward(self, src, trg): FILE: ML/Pytorch/more_advanced/seq2seq_transformer/utils.py function translate_sentence (line 7) | def translate_sentence(model, sentence, german, english, device, max_len... function bleu (line 45) | def bleu(data, model, german, english, device): function save_checkpoint (line 62) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 67) | def load_checkpoint(checkpoint, model, optimizer): FILE: ML/Pytorch/more_advanced/torchtext/torchtext_tutorial1.py function tokenize (line 20) | def tokenize(text): class RNN_LSTM (line 54) | class RNN_LSTM(nn.Module): method __init__ (line 55) | def __init__(self, input_size, embed_size, hidden_size, num_layers): method forward (line 64) | def forward(self, x): FILE: ML/Pytorch/more_advanced/torchtext/torchtext_tutorial2.py function tokenize_eng (line 15) | def tokenize_eng(text): function tokenize_ger (line 19) | def tokenize_ger(text): FILE: ML/Pytorch/more_advanced/torchtext/torchtext_tutorial3.py function tokenize_eng (line 39) | def tokenize_eng(text): function tokenize_ger (line 43) | def tokenize_ger(text): FILE: ML/Pytorch/more_advanced/transformer_from_scratch/transformer_from_scratch.py class SelfAttention (line 15) | class SelfAttention(nn.Module): method __init__ (line 16) | def __init__(self, embed_size, heads): method forward (line 31) | def forward(self, values, keys, query, mask): class TransformerBlock (line 80) | class TransformerBlock(nn.Module): method __init__ (line 81) | def __init__(self, embed_size, heads, dropout, forward_expansion): method forward (line 95) | def forward(self, value, key, query, mask): class Encoder (line 105) | class Encoder(nn.Module): method __init__ (line 106) | def __init__( method forward (line 138) | def forward(self, x, mask): class DecoderBlock (line 153) | class DecoderBlock(nn.Module): method __init__ (line 154) | def __init__(self, embed_size, heads, forward_expansion, dropout, devi... method forward (line 163) | def forward(self, x, value, key, src_mask, trg_mask): class Decoder (line 170) | class Decoder(nn.Module): method __init__ (line 171) | def __init__( method forward (line 196) | def forward(self, x, enc_out, src_mask, trg_mask): class Transformer (line 209) | class Transformer(nn.Module): method __init__ (line 210) | def __init__( method make_src_mask (line 253) | def make_src_mask(self, src): method make_trg_mask (line 258) | def make_trg_mask(self, trg): method forward (line 266) | def forward(self, src, trg): FILE: ML/Pytorch/object_detection/YOLO/dataset.py class VOCDataset (line 11) | class VOCDataset(torch.utils.data.Dataset): method __init__ (line 12) | def __init__( method __len__ (line 23) | def __len__(self): method __getitem__ (line 26) | def __getitem__(self, index): FILE: ML/Pytorch/object_detection/YOLO/loss.py class YoloLoss (line 11) | class YoloLoss(nn.Module): method __init__ (line 16) | def __init__(self, S=7, B=2, C=20): method forward (line 34) | def forward(self, predictions, target): FILE: ML/Pytorch/object_detection/YOLO/model.py class CNNBlock (line 38) | class CNNBlock(nn.Module): method __init__ (line 39) | def __init__(self, in_channels, out_channels, **kwargs): method forward (line 45) | def forward(self, x): class Yolov1 (line 49) | class Yolov1(nn.Module): method __init__ (line 50) | def __init__(self, in_channels=3, **kwargs): method forward (line 57) | def forward(self, x): method _create_conv_layers (line 61) | def _create_conv_layers(self, architecture): method _create_fcs (line 105) | def _create_fcs(self, split_size, num_boxes, num_classes): FILE: ML/Pytorch/object_detection/YOLO/train.py class Compose (line 43) | class Compose(object): method __init__ (line 44) | def __init__(self, transforms): method __call__ (line 47) | def __call__(self, img, bboxes): function train_fn (line 57) | def train_fn(train_loader, model, optimizer, loss_fn): function main (line 76) | def main(): FILE: ML/Pytorch/object_detection/YOLO/utils.py function intersection_over_union (line 7) | def intersection_over_union(boxes_preds, boxes_labels, box_format="midpo... function non_max_suppression (line 54) | def non_max_suppression(bboxes, iou_threshold, threshold, box_format="co... function mean_average_precision (line 95) | def mean_average_precision( function plot_image (line 203) | def plot_image(image, boxes): function get_bboxes (line 235) | def get_bboxes( function convert_cellboxes (line 290) | def convert_cellboxes(predictions, S=7): function cellboxes_to_boxes (line 327) | def cellboxes_to_boxes(out, S=7): function save_checkpoint (line 341) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 346) | def load_checkpoint(checkpoint, model, optimizer): FILE: ML/Pytorch/object_detection/YOLOv3/dataset.py class YOLODataset (line 22) | class YOLODataset(Dataset): method __init__ (line 23) | def __init__( method __len__ (line 46) | def __len__(self): method __getitem__ (line 49) | def __getitem__(self, index): function test (line 93) | def test(): FILE: ML/Pytorch/object_detection/YOLOv3/loss.py class YoloLoss (line 13) | class YoloLoss(nn.Module): method __init__ (line 14) | def __init__(self): method forward (line 27) | def forward(self, predictions, target, anchors): FILE: ML/Pytorch/object_detection/YOLOv3/model.py class CNNBlock (line 44) | class CNNBlock(nn.Module): method __init__ (line 45) | def __init__(self, in_channels, out_channels, bn_act=True, **kwargs): method forward (line 52) | def forward(self, x): class ResidualBlock (line 59) | class ResidualBlock(nn.Module): method __init__ (line 60) | def __init__(self, channels, use_residual=True, num_repeats=1): method forward (line 74) | def forward(self, x): class ScalePrediction (line 84) | class ScalePrediction(nn.Module): method __init__ (line 85) | def __init__(self, in_channels, num_classes): method forward (line 95) | def forward(self, x): class YOLOv3 (line 103) | class YOLOv3(nn.Module): method __init__ (line 104) | def __init__(self, in_channels=3, num_classes=80): method forward (line 110) | def forward(self, x): method _create_conv_layers (line 129) | def _create_conv_layers(self): FILE: ML/Pytorch/object_detection/YOLOv3/train.py function train_fn (line 28) | def train_fn(train_loader, model, optimizer, loss_fn, scaler, scaled_anc... function main (line 59) | def main(): FILE: ML/Pytorch/object_detection/YOLOv3/utils.py function iou_width_height (line 14) | def iou_width_height(boxes1, boxes2): function intersection_over_union (line 31) | def intersection_over_union(boxes_preds, boxes_labels, box_format="midpo... function non_max_suppression (line 80) | def non_max_suppression(bboxes, iou_threshold, threshold, box_format="co... function mean_average_precision (line 124) | def mean_average_precision( function plot_image (line 235) | def plot_image(image, boxes): function get_evaluation_bboxes (line 280) | def get_evaluation_bboxes( function cells_to_bboxes (line 337) | def cells_to_bboxes(predictions, anchors, S, is_preds=True): function check_class_accuracy (line 376) | def check_class_accuracy(model, loader, threshold): function get_mean_std (line 409) | def get_mean_std(loader): function save_checkpoint (line 424) | def save_checkpoint(model, optimizer, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 433) | def load_checkpoint(checkpoint_file, model, optimizer, lr): function get_loaders (line 445) | def get_loaders(train_csv_path, test_csv_path): function plot_couple_examples (line 501) | def plot_couple_examples(model, loader, thresh, iou_thresh, anchors): function seed_everything (line 527) | def seed_everything(seed=42): FILE: ML/Pytorch/object_detection/metrics/iou.py function intersection_over_union (line 4) | def intersection_over_union(boxes_preds, boxes_labels, box_format="midpo... FILE: ML/Pytorch/object_detection/metrics/mean_avg_precision.py function mean_average_precision (line 6) | def mean_average_precision( FILE: ML/Pytorch/object_detection/metrics/nms.py function nms (line 4) | def nms(bboxes, iou_threshold, threshold, box_format="corners"): FILE: ML/Pytorch/others/default_setups/CV - Image Classification/augmentations.py function ShearX (line 7) | def ShearX(img, v): # [-0.3, 0.3] function ShearY (line 14) | def ShearY(img, v): # [-0.3, 0.3] function TranslateX (line 21) | def TranslateX(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function TranslateXabs (line 29) | def TranslateXabs(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function TranslateY (line 36) | def TranslateY(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function TranslateYabs (line 44) | def TranslateYabs(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function Rotate (line 51) | def Rotate(img, v): # [-30, 30] function AutoContrast (line 58) | def AutoContrast(img, _): function Invert (line 62) | def Invert(img, _): function Equalize (line 66) | def Equalize(img, _): function Flip (line 70) | def Flip(img, _): # not from the paper function Solarize (line 74) | def Solarize(img, v): # [0, 256] function SolarizeAdd (line 79) | def SolarizeAdd(img, addition=0, threshold=128): function Posterize (line 88) | def Posterize(img, v): # [4, 8] function Contrast (line 94) | def Contrast(img, v): # [0.1,1.9] function Color (line 99) | def Color(img, v): # [0.1,1.9] function Brightness (line 104) | def Brightness(img, v): # [0.1,1.9] function Sharpness (line 109) | def Sharpness(img, v): # [0.1,1.9] function Cutout (line 114) | def Cutout(img, v): # [0, 60] => percentage: [0, 0.2] function CutoutAbs (line 123) | def CutoutAbs(img, v): # [0, 60] => percentage: [0, 0.2] function SamplePairing (line 144) | def SamplePairing(imgs): # [0, 0.4] function Identity (line 152) | def Identity(img, v): function augment_list (line 155) | def augment_list(): class RandAugment (line 177) | class RandAugment: method __init__ (line 178) | def __init__(self, n, m): method __call__ (line 183) | def __call__(self, img): FILE: ML/Pytorch/others/default_setups/CV - Image Classification/dataset.py class MyImageFolder (line 9) | class MyImageFolder(Dataset): method __init__ (line 10) | def __init__(self, root_dir, transform=None): method __len__ (line 21) | def __len__(self): method __getitem__ (line 24) | def __getitem__(self, index): FILE: ML/Pytorch/others/default_setups/CV - Image Classification/model.py class Net (line 4) | class Net(nn.Module): method __init__ (line 5) | def __init__(self, net_version, num_classes): method forward (line 12) | def forward(self, x): FILE: ML/Pytorch/others/default_setups/CV - Image Classification/train.py function train_fn (line 12) | def train_fn(loader, model, optimizer, loss_fn, scaler, device): function main (line 30) | def main(): FILE: ML/Pytorch/others/default_setups/CV - Image Classification/utils.py function check_accuracy (line 9) | def check_accuracy(loader, model, device="cuda"): function save_checkpoint (line 29) | def save_checkpoint(state, filename="my_checkpoint.pth.tar"): function load_checkpoint (line 34) | def load_checkpoint(checkpoint, model, optimizer): function make_prediction (line 39) | def make_prediction(model, transform, rootdir, device): FILE: ML/Pytorch/pytorch_lightning/1. start code/simple_fc.py class NN (line 11) | class NN(nn.Module): method __init__ (line 12) | def __init__(self, input_size, num_classes): method forward (line 17) | def forward(self, x): function check_accuracy (line 75) | def check_accuracy(loader, model): FILE: ML/Pytorch/pytorch_lightning/10. Multi-GPU/callbacks.py class MyPrintingCallback (line 3) | class MyPrintingCallback(Callback): method __init__ (line 4) | def __init__(self): method on_train_start (line 7) | def on_train_start(self, trainer, pl_module): method on_train_end (line 10) | def on_train_end(self, trainer, pl_module): FILE: ML/Pytorch/pytorch_lightning/10. Multi-GPU/dataset.py class MnistDataModule (line 12) | class MnistDataModule(pl.LightningDataModule): method __init__ (line 13) | def __init__(self, data_dir, batch_size, num_workers): method prepare_data (line 19) | def prepare_data(self): method setup (line 23) | def setup(self, stage): method train_dataloader (line 42) | def train_dataloader(self): method val_dataloader (line 50) | def val_dataloader(self): method test_dataloader (line 58) | def test_dataloader(self): FILE: ML/Pytorch/pytorch_lightning/10. Multi-GPU/model.py class NN (line 14) | class NN(pl.LightningModule): method __init__ (line 15) | def __init__(self, input_size, learning_rate, num_classes): method forward (line 26) | def forward(self, x): method training_step (line 31) | def training_step(self, batch, batch_idx): method training_epoch_end (line 51) | def training_epoch_end(self, outputs): method validation_step (line 64) | def validation_step(self, batch, batch_idx): method test_step (line 69) | def test_step(self, batch, batch_idx): method _common_step (line 74) | def _common_step(self, batch, batch_idx): method predict_step (line 81) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 88) | def configure_optimizers(self): FILE: ML/Pytorch/pytorch_lightning/2. LightningModule/simple_fc.py class NN (line 11) | class NN(nn.Module): method __init__ (line 12) | def __init__(self, input_size, num_classes): method forward (line 17) | def forward(self, x): method __init__ (line 23) | def __init__(self, input_size, num_classes): method forward (line 29) | def forward(self, x): method training_step (line 34) | def training_step(self, batch, batch_idx): method validation_step (line 39) | def validation_step(self, batch, batch_idx): method test_step (line 44) | def test_step(self, batch, batch_idx): method _common_step (line 49) | def _common_step(self, batch, batch_idx): method predict_step (line 56) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 63) | def configure_optimizers(self): class NN (line 22) | class NN(pl.LightningModule): method __init__ (line 12) | def __init__(self, input_size, num_classes): method forward (line 17) | def forward(self, x): method __init__ (line 23) | def __init__(self, input_size, num_classes): method forward (line 29) | def forward(self, x): method training_step (line 34) | def training_step(self, batch, batch_idx): method validation_step (line 39) | def validation_step(self, batch, batch_idx): method test_step (line 44) | def test_step(self, batch, batch_idx): method _common_step (line 49) | def _common_step(self, batch, batch_idx): method predict_step (line 56) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 63) | def configure_optimizers(self): function check_accuracy (line 119) | def check_accuracy(loader, model): FILE: ML/Pytorch/pytorch_lightning/3. Lightning Trainer/simple_fc.py class NN (line 12) | class NN(pl.LightningModule): method __init__ (line 13) | def __init__(self, input_size, num_classes): method forward (line 19) | def forward(self, x): method training_step (line 24) | def training_step(self, batch, batch_idx): method validation_step (line 29) | def validation_step(self, batch, batch_idx): method test_step (line 34) | def test_step(self, batch, batch_idx): method _common_step (line 39) | def _common_step(self, batch, batch_idx): method predict_step (line 46) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 53) | def configure_optimizers(self): function check_accuracy (line 98) | def check_accuracy(loader, model): FILE: ML/Pytorch/pytorch_lightning/4. Metrics/simple_fc.py class MyAccuracy (line 14) | class MyAccuracy(Metric): method __init__ (line 15) | def __init__(self): method update (line 20) | def update(self, preds, target): method compute (line 26) | def compute(self): class NN (line 30) | class NN(pl.LightningModule): method __init__ (line 31) | def __init__(self, input_size, num_classes): method forward (line 40) | def forward(self, x): method training_step (line 45) | def training_step(self, batch, batch_idx): method validation_step (line 53) | def validation_step(self, batch, batch_idx): method test_step (line 58) | def test_step(self, batch, batch_idx): method _common_step (line 63) | def _common_step(self, batch, batch_idx): method predict_step (line 70) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 77) | def configure_optimizers(self): function check_accuracy (line 115) | def check_accuracy(loader, model): FILE: ML/Pytorch/pytorch_lightning/5. DataModule/simple_fc.py class MyAccuracy (line 14) | class MyAccuracy(Metric): method __init__ (line 15) | def __init__(self): method update (line 20) | def update(self, preds, target): method compute (line 26) | def compute(self): class NN (line 30) | class NN(pl.LightningModule): method __init__ (line 31) | def __init__(self, input_size, num_classes): method forward (line 40) | def forward(self, x): method training_step (line 45) | def training_step(self, batch, batch_idx): method validation_step (line 53) | def validation_step(self, batch, batch_idx): method test_step (line 58) | def test_step(self, batch, batch_idx): method _common_step (line 63) | def _common_step(self, batch, batch_idx): method predict_step (line 70) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 77) | def configure_optimizers(self): class MnistDataModule (line 81) | class MnistDataModule(pl.LightningDataModule): method __init__ (line 82) | def __init__(self, data_dir, batch_size, num_workers): method prepare_data (line 88) | def prepare_data(self): method setup (line 92) | def setup(self, stage): method train_dataloader (line 107) | def train_dataloader(self): method val_dataloader (line 115) | def val_dataloader(self): method test_dataloader (line 123) | def test_dataloader(self): FILE: ML/Pytorch/pytorch_lightning/6. Restructuring/dataset.py class MnistDataModule (line 11) | class MnistDataModule(pl.LightningDataModule): method __init__ (line 12) | def __init__(self, data_dir, batch_size, num_workers): method prepare_data (line 18) | def prepare_data(self): method setup (line 22) | def setup(self, stage): method train_dataloader (line 37) | def train_dataloader(self): method val_dataloader (line 45) | def val_dataloader(self): method test_dataloader (line 53) | def test_dataloader(self): FILE: ML/Pytorch/pytorch_lightning/6. Restructuring/model.py class NN (line 13) | class NN(pl.LightningModule): method __init__ (line 14) | def __init__(self, input_size, learning_rate, num_classes): method forward (line 25) | def forward(self, x): method training_step (line 30) | def training_step(self, batch, batch_idx): method validation_step (line 46) | def validation_step(self, batch, batch_idx): method test_step (line 51) | def test_step(self, batch, batch_idx): method _common_step (line 56) | def _common_step(self, batch, batch_idx): method predict_step (line 63) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 70) | def configure_optimizers(self): FILE: ML/Pytorch/pytorch_lightning/7. Callbacks/callbacks.py class MyPrintingCallback (line 3) | class MyPrintingCallback(Callback): method __init__ (line 4) | def __init__(self): method on_train_start (line 7) | def on_train_start(self, trainer, pl_module): method on_train_end (line 10) | def on_train_end(self, trainer, pl_module): FILE: ML/Pytorch/pytorch_lightning/7. Callbacks/dataset.py class MnistDataModule (line 11) | class MnistDataModule(pl.LightningDataModule): method __init__ (line 12) | def __init__(self, data_dir, batch_size, num_workers): method prepare_data (line 18) | def prepare_data(self): method setup (line 22) | def setup(self, stage): method train_dataloader (line 37) | def train_dataloader(self): method val_dataloader (line 45) | def val_dataloader(self): method test_dataloader (line 53) | def test_dataloader(self): FILE: ML/Pytorch/pytorch_lightning/7. Callbacks/model.py class NN (line 13) | class NN(pl.LightningModule): method __init__ (line 14) | def __init__(self, input_size, learning_rate, num_classes): method forward (line 25) | def forward(self, x): method training_step (line 30) | def training_step(self, batch, batch_idx): method validation_step (line 46) | def validation_step(self, batch, batch_idx): method test_step (line 51) | def test_step(self, batch, batch_idx): method _common_step (line 56) | def _common_step(self, batch, batch_idx): method predict_step (line 63) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 70) | def configure_optimizers(self): FILE: ML/Pytorch/pytorch_lightning/8. Logging Tensorboard/callbacks.py class MyPrintingCallback (line 3) | class MyPrintingCallback(Callback): method __init__ (line 4) | def __init__(self): method on_train_start (line 7) | def on_train_start(self, trainer, pl_module): method on_train_end (line 10) | def on_train_end(self, trainer, pl_module): FILE: ML/Pytorch/pytorch_lightning/8. Logging Tensorboard/dataset.py class MnistDataModule (line 12) | class MnistDataModule(pl.LightningDataModule): method __init__ (line 13) | def __init__(self, data_dir, batch_size, num_workers): method prepare_data (line 19) | def prepare_data(self): method setup (line 23) | def setup(self, stage): method train_dataloader (line 42) | def train_dataloader(self): method val_dataloader (line 50) | def val_dataloader(self): method test_dataloader (line 58) | def test_dataloader(self): FILE: ML/Pytorch/pytorch_lightning/8. Logging Tensorboard/model.py class NN (line 14) | class NN(pl.LightningModule): method __init__ (line 15) | def __init__(self, input_size, learning_rate, num_classes): method forward (line 26) | def forward(self, x): method training_step (line 31) | def training_step(self, batch, batch_idx): method validation_step (line 54) | def validation_step(self, batch, batch_idx): method test_step (line 59) | def test_step(self, batch, batch_idx): method _common_step (line 64) | def _common_step(self, batch, batch_idx): method predict_step (line 71) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 78) | def configure_optimizers(self): FILE: ML/Pytorch/pytorch_lightning/9. Profiler/callbacks.py class MyPrintingCallback (line 3) | class MyPrintingCallback(Callback): method __init__ (line 4) | def __init__(self): method on_train_start (line 7) | def on_train_start(self, trainer, pl_module): method on_train_end (line 10) | def on_train_end(self, trainer, pl_module): FILE: ML/Pytorch/pytorch_lightning/9. Profiler/dataset.py class MnistDataModule (line 12) | class MnistDataModule(pl.LightningDataModule): method __init__ (line 13) | def __init__(self, data_dir, batch_size, num_workers): method prepare_data (line 19) | def prepare_data(self): method setup (line 23) | def setup(self, stage): method train_dataloader (line 42) | def train_dataloader(self): method val_dataloader (line 50) | def val_dataloader(self): method test_dataloader (line 58) | def test_dataloader(self): FILE: ML/Pytorch/pytorch_lightning/9. Profiler/model.py class NN (line 14) | class NN(pl.LightningModule): method __init__ (line 15) | def __init__(self, input_size, learning_rate, num_classes): method forward (line 26) | def forward(self, x): method training_step (line 31) | def training_step(self, batch, batch_idx): method training_epoch_end (line 51) | def training_epoch_end(self, outputs): method validation_step (line 64) | def validation_step(self, batch, batch_idx): method test_step (line 69) | def test_step(self, batch, batch_idx): method _common_step (line 74) | def _common_step(self, batch, batch_idx): method predict_step (line 81) | def predict_step(self, batch, batch_idx): method configure_optimizers (line 88) | def configure_optimizers(self): FILE: ML/Pytorch/recommender_systems/neural_collaborative_filtering/main.py class MovieLens (line 18) | class MovieLens(Dataset): method __init__ (line 19) | def __init__(self, df_ratings): method __len__ (line 22) | def __len__(self): method __getitem__ (line 25) | def __getitem__(self, idx): class LightningData (line 33) | class LightningData(pl.LightningDataModule): method __init__ (line 34) | def __init__(self, batch_size): method prepare_data (line 38) | def prepare_data(self): method setup (line 53) | def setup(self, stage=None): method train_dataloader (line 57) | def train_dataloader(self): method val_dataloader (line 60) | def val_dataloader(self): class Net (line 63) | class Net(nn.Module): method __init__ (line 64) | def __init__(self, n_users, n_movies, n_factors=50): method forward (line 70) | def forward(self, user, movie): class NetLightning (line 77) | class NetLightning(pl.LightningModule): method __init__ (line 78) | def __init__(self, n_users, n_movies, n_factors=50, lr=3e-4): method forward (line 87) | def forward(self, user, movie): method training_step (line 90) | def training_step(self, batch, batch_idx): method validation_step (line 98) | def validation_step(self, batch, batch_idx): method predict_step (line 105) | def predict_step(self, user_id): method configure_optimizers (line 109) | def configure_optimizers(self): FILE: ML/TensorFlow/Basics/tutorial10-save-model.py class MyModel (line 34) | class MyModel(keras.Model): method __init__ (line 35) | def __init__(self): method call (line 40) | def call(self, input_tensor): FILE: ML/TensorFlow/Basics/tutorial12-tensorflowdatasets.py function normalize_img (line 25) | def normalize_img(image, label): function build_vocabulary (line 75) | def build_vocabulary(): function my_enc (line 89) | def my_enc(text_tensor, label): function encode_map_fn (line 94) | def encode_map_fn(text, label): FILE: ML/TensorFlow/Basics/tutorial13-data-augmentation.py function normalize_img (line 18) | def normalize_img(image, label): function augment (line 27) | def augment(image, label): FILE: ML/TensorFlow/Basics/tutorial14-callbacks.py function normalize_img (line 22) | def normalize_img(image, label): class OurOwnCallback (line 55) | class OurOwnCallback(keras.callbacks.Callback): method on_epoch_end (line 56) | def on_epoch_end(self, epoch, logs=None): FILE: ML/TensorFlow/Basics/tutorial15-customizing-modelfit.py class CustomFit (line 28) | class CustomFit(keras.Model): method __init__ (line 29) | def __init__(self, model): method compile (line 33) | def compile(self, optimizer, loss): method train_step (line 38) | def train_step(self, data): method test_step (line 58) | def test_step(self, data): FILE: ML/TensorFlow/Basics/tutorial16-customloops.py function normalize_img (line 23) | def normalize_img(image, label): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/1_tb_callback.py function normalize_img (line 27) | def normalize_img(image, label): function augment (line 32) | def augment(image, label): function get_model (line 72) | def get_model(): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/2_tb_scalars.py function normalize_img (line 27) | def normalize_img(image, label): function augment (line 36) | def augment(image, label): function get_model (line 73) | def get_model(): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/3_tb_images.py function normalize_img (line 29) | def normalize_img(image, label): function augment (line 38) | def augment(image, label): function get_model (line 78) | def get_model(): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/4_tb_confusion.py function normalize_img (line 29) | def normalize_img(image, label): function augment (line 38) | def augment(image, label): function get_model (line 75) | def get_model(): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/5_tb_graph.py function my_func (line 22) | def my_func(x, y): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/6_tb_hparams.py function normalize_img (line 28) | def normalize_img(image, label): function augment (line 37) | def augment(image, label): function train_model_one_epoch (line 74) | def train_model_one_epoch(hparams): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/7_tb_projector.py function normalize_img (line 29) | def normalize_img(image, label): function augment (line 38) | def augment(image, label): FILE: ML/TensorFlow/Basics/tutorial17-tensorboard/utils.py function plot_to_image (line 14) | def plot_to_image(figure): function image_grid (line 35) | def image_grid(data, labels, class_names): function get_confusion_matrix (line 59) | def get_confusion_matrix(y_labels, logits, class_names): function plot_confusion_matrix (line 68) | def plot_confusion_matrix(cm, class_names): function create_sprite (line 99) | def create_sprite(data): function plot_to_projector (line 122) | def plot_to_projector( FILE: ML/TensorFlow/Basics/tutorial18-customdata-images/1_in_subfolders.py function augment (line 58) | def augment(x, y): function training (line 109) | def training(): FILE: ML/TensorFlow/Basics/tutorial18-customdata-images/2_csv_file.py function read_image (line 17) | def read_image(image_file, label): function augment (line 23) | def augment(image, label): FILE: ML/TensorFlow/Basics/tutorial18-customdata-images/3_single_folder.py function process_path (line 18) | def process_path(file_path): FILE: ML/TensorFlow/Basics/tutorial19-customdata-text/tutorial19-customdata-text.py function filter_train (line 51) | def filter_train(line): function filter_test (line 63) | def filter_test(line): function build_vocabulary (line 85) | def build_vocabulary(ds_train, threshold=200): function my_encoder (line 125) | def my_encoder(text_tensor, label): function encode_map_fn (line 130) | def encode_map_fn(line): FILE: ML/TensorFlow/Basics/tutorial20-classify-cancer-beginner-project-example/train_isic.py function plot_roc (line 96) | def plot_roc(labels, data): FILE: ML/TensorFlow/Basics/tutorial4-convnet.py function my_model (line 32) | def my_model(): FILE: ML/TensorFlow/Basics/tutorial5-regularization.py function my_model (line 18) | def my_model(): FILE: ML/TensorFlow/Basics/tutorial7-indepth-functional.py function read_image (line 30) | def read_image(image_path, label): FILE: ML/TensorFlow/Basics/tutorial8_keras_subclassing.py class CNNBlock (line 20) | class CNNBlock(layers.Layer): method __init__ (line 21) | def __init__(self, out_channels, kernel_size=3): method call (line 26) | def call(self, input_tensor, training=False): class ResBlock (line 38) | class ResBlock(layers.Layer): method __init__ (line 39) | def __init__(self, channels): method call (line 48) | def call(self, input_tensor, training=False): class ResNet_Like (line 56) | class ResNet_Like(keras.Model): method __init__ (line 57) | def __init__(self, num_classes=10): method call (line 65) | def call(self, input_tensor, training=False): method model (line 73) | def model(self): FILE: ML/TensorFlow/Basics/tutorial9-custom-layers.py class Dense (line 18) | class Dense(layers.Layer): method __init__ (line 19) | def __init__(self, units, input_dim): method call (line 31) | def call(self, inputs): method __init__ (line 36) | def __init__(self, units): method build (line 40) | def build(self, input_shape): method call (line 51) | def call(self, inputs): class Dense (line 35) | class Dense(layers.Layer): method __init__ (line 19) | def __init__(self, units, input_dim): method call (line 31) | def call(self, inputs): method __init__ (line 36) | def __init__(self, units): method build (line 40) | def build(self, input_shape): method call (line 51) | def call(self, inputs): class MyReLU (line 55) | class MyReLU(layers.Layer): method __init__ (line 56) | def __init__(self): method call (line 59) | def call(self, x): class MyModel (line 63) | class MyModel(Model): # model.fit, model.evalute, model.predict method __init__ (line 64) | def __init__(self, num_classes=10): method call (line 73) | def call(self, x): FILE: ML/TensorFlow/CNN_architectures/AlexNet/alexnet.py function AlexNet (line 23) | def AlexNet(input_shape: typing.Tuple[int], classes: int = 1000) -> Model: FILE: ML/TensorFlow/CNN_architectures/GoogLeNet/block.py function convolution_block (line 22) | def convolution_block( function inception_block (line 55) | def inception_block( function auxiliary_block (line 131) | def auxiliary_block( FILE: ML/TensorFlow/CNN_architectures/GoogLeNet/googlenet.py function GoogLeNet (line 27) | def GoogLeNet(input_shape: typing.Tuple[int] = (224, 224, 3), classes: i... FILE: ML/TensorFlow/CNN_architectures/LeNet5/lenet5.py function LeNet5 (line 21) | def LeNet5(input_shape: typing.Tuple[int], classes: int = 1000) -> Model: FILE: ML/TensorFlow/CNN_architectures/ResNet/block.py function block (line 17) | def block( FILE: ML/TensorFlow/CNN_architectures/ResNet/resnet.py function ResNet (line 27) | def ResNet(name: str, layers: typing.List[int], input_shape: typing.Tupl... function make_layer (line 118) | def make_layer(X: tf.Tensor, layers: int, kernel_size: int, filters: typ... FILE: ML/TensorFlow/CNN_architectures/VGGNet/vggnet.py function VGGNet (line 24) | def VGGNet( function make_conv_layer (line 60) | def make_conv_layer( function make_dense_layer (line 107) | def make_dense_layer(X: tf.Tensor, output_units: int, dropout = 0.5, act... FILE: ML/algorithms/decisiontree/decision_tree.py class DecisionTree (line 26) | class DecisionTree: method __init__ (line 27) | def __init__(self, max_depth, min_node_size): method calculate_gini (line 44) | def calculate_gini(self, child_nodes): method apply_split (line 84) | def apply_split(self, feature_index, threshold, data): method find_best_split (line 107) | def find_best_split(self, data): method calc_class (line 138) | def calc_class(self, node): method recursive_split (line 157) | def recursive_split(self, node, depth): method train (line 200) | def train(self, X): method print_dt (line 215) | def print_dt(self, tree, depth=0): method predict_single (line 240) | def predict_single(self, tree, instance): method predict (line 260) | def predict(self, X): FILE: ML/algorithms/kmeans/kmeansclustering.py class KMeansClustering (line 16) | class KMeansClustering: method __init__ (line 17) | def __init__(self, X, num_clusters): method initialize_random_centroids (line 24) | def initialize_random_centroids(self, X): method create_clusters (line 33) | def create_clusters(self, X, centroids): method calculate_new_centroids (line 46) | def calculate_new_centroids(self, clusters, X): method predict_cluster (line 54) | def predict_cluster(self, clusters, X): method plot_fig (line 63) | def plot_fig(self, X, y): method fit (line 67) | def fit(self, X): FILE: ML/algorithms/knn/knn.py class KNearestNeighbor (line 13) | class KNearestNeighbor: method __init__ (line 14) | def __init__(self, k): method train (line 18) | def train(self, X, y): method predict (line 22) | def predict(self, X_test, num_loops=0): method compute_distance_two_loops (line 34) | def compute_distance_two_loops(self, X_test): method compute_distance_one_loop (line 53) | def compute_distance_one_loop(self, X_test): method compute_distance_vectorized (line 70) | def compute_distance_vectorized(self, X_test): method predict_labels (line 88) | def predict_labels(self, distances): FILE: ML/algorithms/linearregression/linear_regression_gradient_descent.py class LinearRegression (line 16) | class LinearRegression: method __init__ (line 17) | def __init__(self, print_cost=False): method y_hat (line 22) | def y_hat(self, X, w): method cost (line 25) | def cost(self, yhat, y): method gradient_descent (line 30) | def gradient_descent(self, w, X, y, yhat): method main (line 36) | def main(self, X, y): FILE: ML/algorithms/linearregression/linear_regression_normal_equation.py function linear_regression_normal_equation (line 16) | def linear_regression_normal_equation(X, y): FILE: ML/algorithms/logisticregression/logistic_regression.py class LogisticRegression (line 13) | class LogisticRegression: method __init__ (line 14) | def __init__(self, X, learning_rate=0.1, num_iters=10000): method train (line 21) | def train(self, X, y): method predict (line 51) | def predict(self, X): method sigmoid (line 57) | def sigmoid(self, z): FILE: ML/algorithms/naivebayes/naivebayes.py class NaiveBayes (line 20) | class NaiveBayes: method __init__ (line 21) | def __init__(self, X, y): method fit (line 26) | def fit(self, X): method predict (line 38) | def predict(self, X): method density_function (line 50) | def density_function(self, x, mean, sigma): FILE: ML/algorithms/neuralnetwork/NN.py class NeuralNetwork (line 13) | class NeuralNetwork: method __init__ (line 14) | def __init__(self, X, y): method init_kaiming_weights (line 26) | def init_kaiming_weights(self, l0, l1): method forward_prop (line 33) | def forward_prop(self, X, parameters): method compute_cost (line 57) | def compute_cost(self, y, probs, parameters): method back_prop (line 72) | def back_prop(self, cache, parameters, y): method update_parameters (line 104) | def update_parameters(self, parameters, grads): method main (line 128) | def main(self, X, y, num_iter=10000): FILE: ML/algorithms/neuralnetwork/utils.py function create_dataset (line 11) | def create_dataset(N, K=2): function plot_contour (line 30) | def plot_contour(X, y, model, parameters): FILE: ML/algorithms/randomforest/random_forest.py class RandomForest (line 39) | class RandomForest: method __init__ (line 40) | def __init__(self,n_trees,fold_size): method cross_validation_split (line 59) | def cross_validation_split(self,dataset, n_folds, p): method randomize_features (line 82) | def randomize_features(self,splits): method print_trees (line 102) | def print_trees(self): method train (line 117) | def train(self,X): method predict (line 133) | def predict(self,X): FILE: ML/algorithms/svm/svm.py function linear (line 23) | def linear(x, z): function polynomial (line 27) | def polynomial(x, z, p=5): function gaussian (line 31) | def gaussian(x, z, sigma=0.1): class SVM (line 35) | class SVM: method __init__ (line 36) | def __init__(self, kernel=gaussian, C=1): method fit (line 40) | def fit(self, X, y): method predict (line 62) | def predict(self, X): method get_parameters (line 75) | def get_parameters(self, alphas): FILE: ML/algorithms/svm/utils.py function create_dataset (line 11) | def create_dataset(N, D=2, K=2): function plot_contour (line 31) | def plot_contour(X, y, svm): FILE: ML/ml_metrics/metrics.py function true_positives (line 7) | def true_positives(y_true, y_pred): function true_negatives (line 15) | def true_negatives(y_true, y_pred): function false_positives (line 23) | def false_positives(y_true, y_pred): function false_negatives (line 31) | def false_negatives(y_true, y_pred): function binary_accuracy (line 39) | def binary_accuracy(y_true, y_pred): function precision (line 47) | def precision(y_true, y_pred): function recall (line 58) | def recall(y_true, y_pred): function multiclass_accuracy (line 69) | def multiclass_accuracy(y_true, y_pred): function confusion_matrix (line 77) | def confusion_matrix(y_true, y_pred): function accuracy_cm (line 90) | def accuracy_cm(cm): function balanced_accuracy_cm (line 94) | def balanced_accuracy_cm(cm): function precision_cm (line 104) | def precision_cm(cm, average="specific", class_label=1, eps=1e-12): function recall_cm (line 132) | def recall_cm(cm, average="specific", class_label=1, eps=1e-12): function f1score_cm (line 154) | def f1score_cm(cm, average="specific", class_label=1): function roc_curve (line 170) | def roc_curve(y_true, y_preds, plot_graph=True, calculate_AUC=True, thre... function precision_recall_curve (line 195) | def precision_recall_curve(y_true, y_preds, plot_graph=True, calculate_A... FILE: ML_tests/LinearRegression_tests/LinearRegression_GD.py class TestLinearRegression_GradientDescent (line 15) | class TestLinearRegression_GradientDescent(unittest.TestCase): method setUp (line 16) | def setUp(self): method test_perfectpositiveslope (line 40) | def test_perfectpositiveslope(self): method test_perfectnegativeslope (line 45) | def test_perfectnegativeslope(self): method test_multipledimension (line 50) | def test_multipledimension(self): method test_zeros (line 55) | def test_zeros(self): method test_noisydata (line 60) | def test_noisydata(self): FILE: ML_tests/LinearRegression_tests/LinearRegression_normal.py class TestLinearRegression_NormalEq (line 16) | class TestLinearRegression_NormalEq(unittest.TestCase): method setUp (line 17) | def setUp(self): method test_perfectpositiveslope (line 39) | def test_perfectpositiveslope(self): method test_perfectnegativeslope (line 46) | def test_perfectnegativeslope(self): method test_multipledimension (line 51) | def test_multipledimension(self): method test_zeros (line 58) | def test_zeros(self): method test_noisydata (line 63) | def test_noisydata(self): FILE: ML_tests/Object_detection_tests/iou_test.py class TestIntersectionOverUnion (line 9) | class TestIntersectionOverUnion(unittest.TestCase): method setUp (line 10) | def setUp(self): method test_both_inside_cell_shares_area (line 82) | def test_both_inside_cell_shares_area(self): method test_partially_outside_cell_shares_area (line 86) | def test_partially_outside_cell_shares_area(self): method test_both_inside_cell_shares_no_area (line 90) | def test_both_inside_cell_shares_no_area(self): method test_midpoint_outside_cell_shares_area (line 94) | def test_midpoint_outside_cell_shares_area(self): method test_both_inside_cell_shares_entire_area (line 98) | def test_both_inside_cell_shares_entire_area(self): method test_box_format_x1_y1_x2_y2 (line 102) | def test_box_format_x1_y1_x2_y2(self): method test_additional_and_batch (line 106) | def test_additional_and_batch(self): FILE: ML_tests/Object_detection_tests/map_test.py class TestMeanAveragePrecision (line 8) | class TestMeanAveragePrecision(unittest.TestCase): method setUp (line 9) | def setUp(self): method test_all_correct_one_class (line 62) | def test_all_correct_one_class(self): method test_all_correct_batch (line 72) | def test_all_correct_batch(self): method test_all_wrong_class (line 82) | def test_all_wrong_class(self): method test_one_inaccurate_box (line 92) | def test_one_inaccurate_box(self): method test_all_wrong_class (line 102) | def test_all_wrong_class(self): FILE: ML_tests/Object_detection_tests/nms_test.py class TestNonMaxSuppression (line 9) | class TestNonMaxSuppression(unittest.TestCase): method setUp (line 10) | def setUp(self): method test_remove_on_iou (line 56) | def test_remove_on_iou(self): method test_keep_on_class (line 65) | def test_keep_on_class(self): method test_remove_on_iou_and_class (line 74) | def test_remove_on_iou_and_class(self): method test_keep_on_iou (line 83) | def test_keep_on_iou(self):