Questions tagged [reshape]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

How to train a CNN when the shape of the training images are too different?

I want to build a CNN model for classifying cracks. The dataset I am using has been prepared from a raw dataset. (I don't have access to that) Now the problem is, in the dataset, each image is of a ...
data scientist's user avatar
0 votes
2 answers
605 views

Input to reshape is a tensor with 4096 values, but the requested shape requires a multiple of 6400. (Having problem with shapes)

I am trying to make a caption generator model. (Having problem with shapes) I am getting error as ...
tikendraw's user avatar
  • 135
0 votes
0 answers
44 views

Why is the shape of my transformed data from CountVectorizer 2x2?

I am currently working on a text classification problem using Python and scikit-learn. I am using CountVectorizer to convert my text data into numerical vectors. I have also applied a preprocessor to ...
Anantashayana Hegde's user avatar
0 votes
0 answers
33 views

Correcting 4-dimensional shape to 3-dimensional shape TCN

I am having issues correctly shaping the 3-dimensional layer in the model. Each time I run the code, I receive the error ...
isabella's user avatar
1 vote
1 answer
31 views

Cannot figure out how to make THIS particular data set long-form (theory, not even code)

I am a tableau developer, but I know Python, stats, and, in short, I think you all will be best able to solve my problem. There is a universal filter on Facility. This means that any dataset/sheet ...
Caitlin's user avatar
  • 21
0 votes
0 answers
15 views

Reducing the dimensionality of entire dataset

I have a lot of datasets with different shapes. For example few of them are (90, 892), (74, 853), (93, 765), ... etc. I want to convert this shape to (90, 4), (74, 4), (93, 4) ... (x, 4). And, after ...
Shikhar's user avatar
1 vote
2 answers
33 views

What are some methods to reduce a dataframe so I can pass it as one sample to an SVM?

I need to classify participants in an NLP study into 3 classes, based on multiple sentences spoken by the participant. I performed a feature extraction on each sentence, and so I am left with a matrix ...
fishfinder's user avatar
0 votes
0 answers
999 views

LSTM Autoencoder set-up for multiple features using Pytorch

I am building an LSTM autoencoder to denoise signals and will take more than 1 feature as it's input. I have setup the model Encoder part as follows which works for single feature inputs (i.e. ...
Ossz's user avatar
  • 113
1 vote
0 answers
60 views

Can some one please explain to me the difference between reshape and resize in a keras?

I have been looking through the internet and i am a bit confused. It is doing the same things so why do we need a resize and a reshape and which is better ??
Nayan Nandakumar's user avatar
1 vote
1 answer
9k views

ValueError: Must pass 2-d input. shape=(15129, 10, 1)

I'm having a problem with reshaping a DataFrame, after doing this ...
WojKie's user avatar
  • 23
1 vote
1 answer
25 views

Tabular data (cancer dataset) reshaping format and prepare for classification

I have a dataset for cancer and non-cancer patients and would like to prepare it for classification. Each sample has 4 columns and 1298 rows. The total number of samples is 68. So my ...
Amirreza Abbasi's user avatar
0 votes
1 answer
47 views

panda grouping dates by variable with transposed value variables

I had read this post panda grouping by month with transpose and it gave me the nearest answer to my question but not the completely solution. How would I get somewhat like the reverse output? My ...
KevG.'s user avatar
  • 1
1 vote
2 answers
822 views

Is it possible to apply pooling across the channel dimension of the input tensor?

I have an input tensor of the shape (32, 256, 256, 256). In this tensor shape, 32 is the batch size. second 256 is the number of channels in the given image of size 256 X 256. I want to do pooling in ...
hanugm's user avatar
  • 157
1 vote
0 answers
38 views

How to correct format the dimension of the validation set - time series

I'm trying to understand how to add my validation data into my LSTM. At the moment I'm loading the train and the test set in the following way: First of all I load my time series from a directory, ...
Fabio's user avatar
  • 53
0 votes
2 answers
1k views

Problems with shape of Conv1D on Keras

I have some problems with layers construction on Keras. I explain the whole problem: I have a feature matrix, with dimensions: 2023 (rows) x 65 (features); I tried to build a CNN, with Conv1D as ...
Martina Mamone's user avatar
1 vote
1 answer
919 views

Modifying U-Net implementation for smaller image size

I'm implementing the U-Net model per the published paper here. This is my model so far: ...
TomSelleck's user avatar
0 votes
1 answer
110 views

Condense matrix of values into one column?

I have a dataset where I have unnecessarily duplicated column variables that I want to condense down. I wish the output wasn't so clumsy and I've already had to do some work to transform it and make ...
aep58's user avatar
  • 1
5 votes
1 answer
6k views

How to slice an input in keras?

I give to keras an input of shape input_shape=(500,). For some reasons, I would like to decompose the input vector into to vectors of respective shapes ...
Contestosis's user avatar
1 vote
2 answers
989 views

Problem in input shape Keras-LSTM [closed]

I want to make a predictor using Keras LSTM model. I have a sequence of places visited. The task is to predict the last destination. I went through different examples but it seems I am not able to ...
bdur's user avatar
  • 137
1 vote
0 answers
80 views

pandas: reshaping the dataset, moving column name as rows [closed]

I currently have the following table: ...
Eli's user avatar
  • 11
0 votes
1 answer
1k views

ValueError: Error when checking input: expected the_input to have 3 dimensions, but got array with shape (14174, 1)

hope you're all doing good ! I am working on Automatic Speech Recognition with Python with the LibriSpeech Dataset. After preprocessing the audios data and applying an "MFCC featurizing" I ...
Hamza Hamdani's user avatar
-1 votes
1 answer
36 views

How can I reshape this array?

I have few difficulties in picking values from an array. Here is a simplified version of the concerned part of the code. (If you would like to put the whole code please mention it) ...
Giselle's user avatar
1 vote
2 answers
2k views

Scalling and unscalling of data for SVR prediction

I'm trying to use SVR to predict a certain feature. I create the model with the following code: ...
MyName's user avatar
  • 137
2 votes
1 answer
32k views

ValueError: Shapes are incompatible when fitting using ImageDataGenerator

I got this error ValueError: Shapes (None, 1) and (None, 3) are incompatible when training my Sequential model. I could not figure out which shapes are actually ...
GPraz's user avatar
  • 123
0 votes
0 answers
36 views

Alternatives to reshaping the data

I have a medical dataset which looks like this: ...
ibayramli's user avatar
1 vote
1 answer
342 views

Keras loaded model output is different from the training model output

When I train my model it has a two-dimension output - it is (none, 1) - corresponding to the time series I'm trying to predict. But whenever I load the saved model in order to make predictions, it has ...
Marlon Teixeira's user avatar
0 votes
1 answer
62 views

Reshaping Pandas DataFrame

I am trying to do the following as shown below. ...
Bikash Chandra Gupta's user avatar
1 vote
2 answers
5k views

Data Reshaping for CNN using Keras

I'm a beginner in Keras. I've loaded MNIST dataset in Keras and checked it's dimension. The code is ...
Dr Nisha Arora's user avatar
1 vote
1 answer
248 views

how to create multiple plot from a panda Dataframe

I want to plot multiple plots. The data is stored in a pandas dataframe and each row should be a seperate plot. Each row has an ID (ZRD_ID) which doenst matter and a date (TAG) and 24 values to be ...
CRoNiC's user avatar
  • 147
1 vote
0 answers
97 views

ValueError when reshaping to 4 dim array for the Keras API

DL beginner here. I'm trying to implement LeNet using Keras and apply it on good ol' MNIST. ...
Tarun Narayanan's user avatar
1 vote
1 answer
438 views

numpy array reshape question

Let's say that I have image data with shape $(32, 32, 3)$ and $50000$ If I would like to reshape it to $(50000, 3, 32, 32)$ what should I do? I tried ...
eum sangwon's user avatar
1 vote
0 answers
22 views

Tensor Shape 'Reshape' during the dataflow

I would like to combine an Autoencoder with a LSTM. However, the 'timestep' is a block for the implements and I would like to train them together. Is there a solution to the tensor 'reshape'? I mean, ...
Jie Wang's user avatar
1 vote
1 answer
185 views

What is the difference between different batch_sizes in Keras Sequential models?

I am interested to know, what happens when I choose batch_size=1 or batch_size=1000 or any other numbers in ...
user3486308's user avatar
  • 1,260
0 votes
1 answer
936 views

keras Sequential CNN for image data reshaping data issues

I am new at keras and CNN and am working on building at CNN for sequential analysis of movement in a image. What I am having issues with is the reshaping the data and the labels that go into the ...
MNM's user avatar
  • 115
2 votes
1 answer
5k views

Keras input shape error

I am trying to load a Keras model and make predictions with it and run into a strange error. An minimal example is the following: ...
W. Verbeke's user avatar
2 votes
1 answer
1k views

Is the multilayer perceptron only able to accept 1d vector of input data? If yes, why is this so?

I am going through the tutorial at the link below which uses MNIST handwritten digit database. https://machinelearningmastery.com/handwritten-digit-recognition-using-convolutional-neural-networks-...
user781486's user avatar
  • 1,335
5 votes
1 answer
11k views

Please explain input shape in Keras

My data consists of 2-dimensional arrays with shape (2,3). The whole dataset (emp) consists of 12 items (I know that it is too small of a number for an NN training, ...
Sergey Kravchenko's user avatar
5 votes
1 answer
10k views

Are view() in Pytorch and reshape() in Numpy similar?

Are view() in torch and reshape() in Numpy similar? view() is applied on torch tensors to ...
Kailash Ahirwar's user avatar
0 votes
1 answer
718 views

Reshape features in rows intro columns python?

My features are arranged in rows, Can anyone tell me please how can I transform them into columns with theirs corresponding times and values?? I mean each features has a set of corresponding times and ...
Carl92's user avatar
  • 21
0 votes
1 answer
962 views

Predictions with arbitrairy sequence length for stateful RNN (LSTM/GRU) in Keras

I have time series data of the following properties: input shape: (num_timesteps, num_features) output shape: (num_timesteps, num_outputs) I reshape it to batch ...
Torben.'s user avatar
  • 259
3 votes
4 answers
2k views

rows to columns in data.table R (or Python)

This is something I can't achieve with the reshape2 library for R. I have the following data: ...
cpumar's user avatar
  • 807