
Improve your automated tests
How to test software using Gherkin? The tests are built using phrases that even a non-technical person can easily understand.
Go to content|Go to the main menu|Go to search
We started with four practical questions: Is it worth using TensorFlow? Would PyTorch be sufficient? What are the real advantages and disadvantages? And how much do these differences matter in a typical project? To answer these questions, however, we need to conduct a small experiment.
The experiment was designed as a comparison of the two frameworks on the same image recognition task. The CIFAR-10 dataset was used, containing 60,000 images of size 32 × 32 pixels across ten classes. The architectures tested were ResNet50, VGG19, and MobileNet. Training was conducted for 5 epochs with a batch size of 32 on Intel i7-11370 and NVIDIA GeForce RTX 3060 hardware.
The experiment followed the same logic in both frameworks:
Accuracy after training was only one part of the picture. The purpose of the test was also to observe how the frameworks behave during computation. The following parameters were monitored:





These graphs show that TensorFlow has significantly higher overhead around epochs. This is often due to processes that occur at the end of each epoch, such as validation, weight updates, and callbacks.
In shorter runs, these overheads are more noticeable. In longer training sessions (tens to hundreds of epochs), the fixed overhead tends to diminish, and the difference becomes less significant.

A significant difference in the strategies of the two frameworks can be observed here. PyTorch is more predictable during debugging, while TensorFlow tends to allocate memory in blocks.


Activity | Pytorch | Tensorflow |
| Installation | Very simple | On Windows, it is highly sensitive to CUDA and cuDNN versions |
| Code readability | Python-like, straightforward debugging | More boilerplate, high abstraction due to Keras API |
| Documentation | Concise, clear | Extensive |

How to test software using Gherkin? The tests are built using phrases that even a non-technical person can easily understand.
Thank you for your interest in subscribing to our newsletter! To complete your registration you need to confirm your subscription. We have just sent you a confirmation link to the email address you provided. Please click on this link to complete your registration. If you do not find the email, please check your spam or "Promotions" folder.
