Testing the model for quality are very bad

Hi. I’m new to torch, I’m having trouble testing the model for quality, the results are very bad (50/50, 45/55, etc). I can’t find the error, I’ve been struggling for a month now, nothing works. A similar model on TensorFlow works great. Can somebody help me? Maybe I made a mistake in the description of the model or something

Nobody wants to help?


Usually general questions such as “my model doesn’t train” are hard to answer as no background was given.
One approach I would use is to try to overfit a small dataset first (e.g. just 10 samples) and make sure the model is able to learn these samples. If not, you might be using a wrong criterion, unnecessary activation functions in the model output, might be accidentally detaching the computation graph etc.

Thanks for the answer. The background is simple. I am using Python Tensorflow to create and train my model. Got amazing results! The application I’m using needs a significant speed boost, so I decided to rewrite everything in C++. It seemed to me that the most suitable and friendly C ++ API in LibTorch, so I rewrote everything for LibTorch. I did it for the first time, but I studied a lot of information on the Internet. So I can assume that I’m doing everything right. Just checked the experiment, trained the Python TF model and C ++ LibTorch on the same dataset, TF excellent results, Torch does not work, as if the network had not been trained, and it works on the training set. I do not understand what’s the matter. It is unlikely that the matter is in the functions used, because it would not work in TF either, where there is a fundamental error associated with the Torch feature. Can I provide the model description code here? Maybe it’s a matter of data transfer, perhaps somewhere that happens with the type or something like that.

I solved the problem myself, thanks.