Skip to content

LukasB3/PyTorch_TensorFlow_Comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch vs TensorFlow Comparison

Project for Selected Topics of Intelligent Systems.

Compares PyTorch and TensorFlow on an image classification task for cats and dogs. Trains the same neural network architecture in both frameworks and then tests the resulting models on a separate test dataset. Also provides the option to classify custom images of cats and dogs.

Setup

Create virtual environment and install from requirements.txt via pip:
pip install -r requirements.txt

Make sure you have your Kaggle Credentials as .json in:
C:\Users\ur_user\.kaggle

To download images from Kaggle run:
python main.py --download

Alternatively download them here:
https://www.kaggle.com/datasets/bhavikjikadara/dog-and-cat-classification-dataset

Run

Framework Train Test Classify
PyTorch python main.py --py_train python main.py --py_test python main.py --py_class
TensorFlow python main.py --tf_train python main.py --tf_test python main.py --tf_class
  1. Train the network first. This will save a model in the Model/ folder.
  2. Test the model using the test dataset to determine its accuracy.
  3. All information and logs will be saved in the Log/ folder.
  4. To classify your own images, place them in the Data/user_input/ folder and then run the classification commands.

About

Comparison of Deep Learning Frameworks: PyTorch vs. TensorFlow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages