Python – InformTFB



How come 0.1 + 0.2 = 0.30000000000000004?

Since childhood, we were taught that 0.1 + 0.2 equals 0.3. However, in the mysterious world of computing, everything works differently. I recently started writing JavaScript code and while reading about data types, I noticed a strange behavior of 0.1 + 0.2 not equal to 0.3.I turned to Stack Overflow for help and found a couple of posts that helped. Take a look below: After doing a lot of research and calculations, […]

Simple PyQt solution: “how to add an image to a program”

Simple solution according to the source code: API documentation:

Generating default Github avatars

In this article, I will show and tell you how to generate avatars as on Github. First, you need to understand how the github avatar works. At first glance, it’s just a random set of colored squares (hereinafter referred to as blocks) in a good order on a gray background. Each avatar has 12 by 12 blocks. Looking at the following picture, I think you understand that the images are […]

How to save memory and double the size of PyTorch models with the new Sharded method

Deep learning models improve as the amount of data and parameters increases. Even with Open AI’s latest GPT-3 model, which uses 175 billion parameters, we have yet to see a plateau in parameter growth. For some areas, such as NLP, the workhorse was Transformer, which requires huge amounts of GPU memory. Realistic models simply don’t fit in memory. The last method is called Sharded [lit. ‘segmented’] was introduced in Zero […]