Skip to content

IncResNet is a convolutional neural network architecture designed for the task of human age recognition, implemented using TorchSharp library. It was created as a part of project carried out at course “Introduction to Machine Learning” at the Warsaw University of Technology.

License

Notifications You must be signed in to change notification settings

Bakaczor/InceptionResidualNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IncResNet

IncResNet, or in full words Inceptive Residual Network, combines the ideas presented in GoogLeNet (Going deeper with convolutions) and ResNet (Deep residual learning for image recognition) papers. Many solutions used for the architecture were also inspired by Inception-ResNet paper (Inception-v4, inception-resnet and the impact of residual connections on learning), which already discussed the proposed idea, but varies in implementation.

The model was implemented in TorchSharp on .NET 7.

Command line arguments

<weights>
The path to the .bin file with serialized weights.

<epochs>
The number of epochs to perform.

<timeout>
The maximum learning time for the session in hours.

Constants

What cannot be set from CLI, must be set from code. At the beginning of the Configuration.cs class you can find:

private static int _trainBatchSize = 32;
private static int _otherBatchSize = 64;
private static int _epochs = 5;

private static readonly string _weightsSavePath = @".\weights.bin";
private static readonly string _trainLoadPath = @".\dataset\training";
private static readonly string _validationLoadPath = @".\dataset\validation";
private static readonly string _testLoadPath = @".\dataset\test";

private static readonly int _loggingInterval = 20;
private static readonly int _timeout = 2 * 3600;

private static readonly string _trainOutput = @".\train.txt";
private static readonly string _validationOutput = @".\validation.txt";
private static readonly string _testOutput = @".\test.txt";

In Program.cs a function accepting a boolean is called:

Configuration.Start(args, false);

If you want to train the model, pass true as second argument, otherwise, if you want to just test it, pass false.

Technically, all of this should be set in some configuration file - I will consider it in the future.

Dependencies

Program uses a few TorchSharp libraries in a form of NuGet packages:

  • TorchSharp
  • TorchVision

and a suitable backend for TorchSharp (choose CUDA if you have Nvidia GPU, otherwise CPU).

Contact

If you have any questions or suggestions feel free to contact me at [email protected].


Copyright © 2024 Bartosz Kaczorowski

About

IncResNet is a convolutional neural network architecture designed for the task of human age recognition, implemented using TorchSharp library. It was created as a part of project carried out at course “Introduction to Machine Learning” at the Warsaw University of Technology.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages