Skip to content
/ raug Public

Raug is a complete pipeline to train deep neural models using Pytorch

License

Notifications You must be signed in to change notification settings

paaatcha/raug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raug

Raug is a simple pipeline to train deep neural models using Pytorch. Those are the main steps you should take to use this pipeline:

  1. Loading the dataset To load your dataset you must call get_data_loader() function, which will create the dataloader.

  2. Create/Define a model You must create/define a model. The easiest way is to load a model from torchvision, for example:

from torchvision import models
my_model = models.resnet50(pretrained=_pretrained)
  1. Define the loss function and the optimizer The third step is to define the loss function and the optimizer. Again, you can call them from Pytorch. Example:
import torch.optim as optim
import torch.nn as nn
loss_fn = nn.CrossEntropyLoss()
optimizer = optim.Adam(my_model.parameters(), lr=0.001)
  1. Training the model Now, to train the model, you must call the function fit_model().

  2. Testing the model Finally, to test the model in a test/validation partition, you just call the function test_model()

Example

You may see an example of the use of this package in the ISIC script in which I use it to train CNNs to classify skin cancer.


For all functions/methods it is included the documentation to described each parameter. Please, refer to them to understand the parameters properly. Also, in Utils folder you find some codes to compute metrics, to load, or to use a telegram bot to follow the training phase.

Dependencies

To install the dependecies you just need to run pip install -r requirements.txt.

What is Raug?

Well, I'm a fan of J. R. R. Tolkien (the author of The Lord of the rings and The Hobbit) who creates some Elf languages. Raug means a powerful creature in Sindarin. As I'm not that creative to create names to my codes, I just choose some elf names.

About

Raug is a complete pipeline to train deep neural models using Pytorch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published