We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm attempting to train this model in Tensorflow.JS, downloading it as such:
// Load the Fashion MNIST dataset const urll = 'http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/'; const filenames = { images: 'train-images-idx3-ubyte.gz', labels: 'train-labels-idx1-ubyte.gz' }; const loadFile = async (filename) => { const url = `${urll}${filename}`; const response = await fetch(url); const buffer = await response.arrayBuffer(); return new Uint8Array(buffer); }; const loadDataset = async () => { const [imageData, labelData] = await Promise.all([ loadFile(filenames.images), loadFile(filenames.labels) ]); const imageTensor = tf.tensor(imageData.slice(16), [60000, 28, 28, 1]); console.log(`imageTensor.shape: ${imageTensor.shape}`); console.log(`imageData.byteLength: ${imageData.byteLength}`); const labelTensor = tf.tensor(labelData.slice(8), [60000], 'int32'); console.log(`labelTensor.shape: ${labelTensor.shape}`); console.log(`labelData.byteLength: ${labelData.byteLength}`); return { images: imageTensor, labels: labelTensor }; };
As I assume the training model has 60,000 images, 28x28 in greyscale, [60000, 28, 28, 1] seems appropriate. However, I get the following error:
[60000, 28, 28, 1]
Error: Based on the provided shape, [60000,28,28,1], the tensor should have 47040000 values but has 26421864
Anything I've done wrong? Apologies if this isn't strictly on-topic, I don't have any other place to ask.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm attempting to train this model in Tensorflow.JS, downloading it as such:
As I assume the training model has 60,000 images, 28x28 in greyscale,
[60000, 28, 28, 1]
seems appropriate. However, I get the following error:Anything I've done wrong? Apologies if this isn't strictly on-topic, I don't have any other place to ask.
The text was updated successfully, but these errors were encountered: