Skip to content

Machine Learning

[PyTorch] Convert Tensor to One-Hot Encoding Type

Today if you are preprocessing some machine learning data, maybe you need to convert PyTorch tensor to one-hot encoding type. There is a intuitive method that is convert TENSOR to NUMPY-ARRAY, and then convert NUMPY-ARRAY to one-hot encoding type, just like this article: [Python] Convert the value to one-hot type in Numpy

Read More »[PyTorch] Convert Tensor to One-Hot Encoding Type

[PyTorch] Tutorial(7) Use Deep Generative Adversarial Network (DCGAN) to generate pictures

Today I want to record how to use Deep generative Adversarial Network (DCGAN) to implement a simple generate picture model. I wanted to demo with delicious snack pictures, but the effect was not very good, I downloaded half a million snack pictures in vain.

Finally, I used the official demo CelebA dataset.

Read More »[PyTorch] Tutorial(7) Use Deep Generative Adversarial Network (DCGAN) to generate pictures

[PyTorch] Tutorial(5) How to train a model to classify CIFAR-10 database

Today we challenged the classifiers of different data sets again. This time, CIFAR-19 is a more difficult problem than MNIST handwriting recognition. In addition to the size of the picture becoming 32×32, CIFAR-10 is no longer a pure grayscale value, but a picture with the three primary colors of RGB.

Read More »[PyTorch] Tutorial(5) How to train a model to classify CIFAR-10 database