About 3,080,000 results
Open links in new tab
  1. How to Index, Slice and Reshape NumPy Arrays for Machine Learning

    Jun 12, 2020 · In this tutorial, you will discover how to manipulate and access your data correctly in NumPy arrays. After completing this tutorial, you will know: How to convert your list data to NumPy arrays. How to access data using Pythonic indexing and slicing. How to resize your data to meet the expectations of some machine learning APIs.

  2. Reshaping of data for deep learning using Keras

    Jul 14, 2021 · mnist.load_data() supplies the MNIST digits with structure (nb_samples, 28, 28) i.e. with 2 dimensions per example representing a greyscale image 28x28. The Convolution2D layers in Keras however, are designed to work with 3 dimensions per example. They have 4-dimensional inputs and outputs.

  3. python - How to reshape machine learning data to match input …

    Feb 17, 2022 · I have tried to reshape the data to match the input shape of the model. This still doesn't work and not really sure how to go about doing this. The data needs to be reshaped but with the correct values. training dataset consists of: [[ 0.00770334 -1.4224063 -2.4392433 ...

  4. python - reshape np array for deep learning - Stack Overflow

    Feb 23, 2019 · Therefore, I have to reshape my data. I do that doing a for loop, but is awfully slow. Is there a way to improve the code and making it faster? Example: if i == 50: z = 0. X2 = np.array(X[z:i, :]).reshape((1, 50, X.shape[1])) else: X2 = np.concatenate([X2, np.array(X[z:i, :]).reshape((1, 50, X.shape[1]))]) z = z + 1.

  5. Flatten, Reshape, and Squeeze Explained - Tensors for Deep Learning ...

    Tensors for neural network programming and deep learning with PyTorch. A deeper look into the tensor reshaping options like flattening, squeezing, and unsqueezing. DEEPLIZARD

  6. Reshape Your Data Seamlessly with `torch.reshape()` in PyTorch

    Dec 14, 2024 · Utilizing the torch.reshape() function is fundamental for effective tensor manipulation in PyTorch. By understanding its functionality and best practices, developers can leverage this tool for seamless data manipulation in deep learning workflows.

  7. How to Reshape Data for Recurrent Neural Networks

    Jun 16, 2024 · AI Product Managers must understand how to reshape data effectively for Recurrent Neural Networks (RNNs). This guide covers key takeaways for preparing your data: understanding data...

  8. Reshaping the Dataset For Neural Networks | by AS | Medium

    Dec 11, 2022 · Reshaping image data for use with a convolutional neural network in Python using the Keras library. optimizer='adam', metrics=['accuracy']) batch_size=32, epochs=10, validation_data=(x_test,...

  9. Reshape Arrays, Normalize Rows, and Softmax Function in Machine Learning

    Jul 15, 2021 · In this tutorial, we’ll learn how to reshape arrays, normalize rows, what is broadcasting, and softmax. Two common NumPy functions used in deep learning are np.shape and np.reshape(). The shape function is used to get the shape (dimension) of a matrix or vector X. Reshape(…) is used to reshape the matrix or vector into another dimension.

  10. python - How to reshape data in Tensorflow dataset ... - Stack Overflow

    Mar 29, 2021 · My question is how I can reshape, ideally in the split function that is passed into the dataset.map function before caching the data? That's easy. Do this in your split function. return window[:-label_length, tf.newaxis], window[-label_length, tf.newaxis, tf.newaxis] This returns the correct shape for the x data (32,20,1) but not for the targets.

  11. Some results have been removed
Refresh