TensorFlow MNIST Examples One Hot Encoding Question

Why does this:

from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)

…make reference to one hot encoding, when the values loaded from the MNIST dataset are float32?

I suppose the one_hot param loads the categorical variables, i.e. targets, as a one-hot variable.
The input data should not be converted to the one-hot form. At least I’ve never seen it before. :wink:

this is the pytorch forum. you should use TensorFlow forums for their questions.

You should be more polite if you are in the business of extolling the virtues of your machine learning framework vs. your competitors, especially when numerous public github resources commingle PyTorch with TensorFlow datasets due to deficiencies in PyTorch’s dataloaders.

hey, i thought you were a TensorFlow user looking for help. Since we have been generally spread thin in supporting the forums, I wanted to be proactive and direct you to the TensorFlow forums. If the comment came of as rude, it’s a misunderstanding.

especially when numerous public github resources commingle PyTorch with TensorFlow datasets due to deficiencies in PyTorch’s dataloaders

If you have any pointers on repos using TF dataloaders with PyTorch training, could you post them? I’d love to go deeper and understand the issues.

2 Likes