src.ml package

Submodules

src.ml.pytorch_example module

From: https://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html

src.ml.pytorch_example.BATCH_SIZE = 16[source]
class src.ml.pytorch_example.TextSentiment(vocab_size, embed_dim, num_class)[source]

Bases: torch.nn.modules.module.Module

forward(text, offsets)[source]
init_weights()[source]
src.ml.pytorch_example.device = device(type='cpu')[source]
src.ml.pytorch_example.generate_batch(batch)[source]
src.ml.pytorch_example.main()[source]
src.ml.pytorch_example.test(model, criterion, data_)[source]
src.ml.pytorch_example.train_func(model, optimizer, criterion, scheduler, sub_train_)[source]