I have a model which is trained with input shape of (5,20) and out put for 20 , where 5…
Jump to turn (58)
- 1I have a model which is trained with input shape of (5,20) and out put for 20 ,
- 2No No, I think you misunderstood it. Current model doesn't outputs a prediction
- 3Let's say I am ready to make changes in my model. From the first option above, d
- 4Could you elaborate more on the alternative way you suggested?
- 5okay listen, forget that. new problem I have excel data in which there are 20 co
- 6please help me with the code
- 7what is the shape of X\test here?
- 8okay so you suggest, I run the above (similar/optimized as per need) model for m
- 9Yes please, that is very good idea. Can you please explain me the second approac
- 10I agree, but see the problem is I do not have any column called RPM. My datafram
- 11are you sure about the code? because with this I am getting encoded dataframe in
- 12Okay thanks for correction. I agree with this. but here when you said , "You can
- 13I agree, but again this model would expect end user to enter 20 features input i
- 14can you elaborate more on alternate approach? how to code for that? what would b
- 15but wait, in this approach RPM should also be there as column in my dataset corr
- 16okay wait, how would that work again? I have 45000 rows I have 20 columns if I e
- 17First of all this may not work as data.shape[0] is 45000 and in rpm list there w
- 18I understood but the code that you gave is creating a dataset with 900000,21 whe
- 19no sir, this will create correct dataframe but it will have only 2000 in the col
- 20ok sir, this works and gives me data frame of shape 900000,3 where in power\cons
- 21Okay X and y is ready then how to define and train LSTM?
- 22don't you think I should divide X and y in train and test ?
- 23then based on this X\train, y\train and similar test variable can you please rew
- 24thanks but before I try above code can you please add early stopping logic there
- 25Okay thanks First question: As in the original data, 45000 samples are collected
- 26Do you think adding another layer, passing RPM as input, will help the accuracy
- 27but can you also make sure that above code will have capacity to return not just
- 28I agree, but where should I pass the variable "n" which represents number of tim
- 29are you sure? I thought above you mentioed n\timesteps as timesteps for input If
- 30Why is your validation\data=([X\test, y\test], y\test) is like this and not vali
- 31what is Input() function in above code? do I need to import anything for that la
- 32let's take a step back at here. can you please tell me what is x\train and y\tra
- 33No sir, Let me clarify once again. I had a dataframe with shape (45000,20) where
- 34but my basic question was how to create X and y from my dataframe? please give m
- 35I think you forgot the main question. You have given an LSTM model above. i want
- 36I think all the code is fine except the one to generate i/p output sequence. imp
- 37in order to verify based on my Data (900000,2) and 20% split percentage can you
- 38In that case in order to run the code by you Split the data into training, valid
- 39Your LSTM code is showing below error ValueError: A Concatenate layer requires i
- 40same error with different shape sir ValueError: A Concatenate layer requires inp
- 41I have run the above code as you said and then while running the concate with th
- 42what is K.reshape? what is K here? should I import anything?
- 43still error ValueError: A Concatenate layer requires inputs with matching shapes
- 44This is the code give by you from keras.layers import Reshape Define early stopp
- 45no it won't work because the shape is different right? it is throwing below erro
- 46no sir, it is throwing this error after above change ValueError: Exception encou
- 47No sir, sorry to bother again but it is still showing the error ValueError: A Co
- 48Hey so good!! This repeatvector idea worked Thanks a lot!! Now how can I fit the
- 49I run this model.fit([X\train, RPM\train], y\train, batch\size=256, epochs=50, v
- 50these are the values X\train: (575992, 10, 1) y\train: (575992,) X\val: (143999,
- 51I am expecting 10 output sequence. in that case also my y should be same shape a
- 52this error comes up for y\train ValueError: cannot reshape array of size 575992
- 53I did that, I changed it and my shapes are now X\train: (575986, 10, 1) y\train:
- 54no wait, this would throw an error right? because we are changing the shape here
- 55after this it throws an error ValueError: Shapes (None, 10) and (None, 10, 10) a
- 56it throws an error sir InvalidArgumentError Traceback (most recent call last) Ce
- 57No sir, I am using mean squared error only
- 58I changed it. Still same error
- User
I have a model which is trained with input shape of (5,20) and out put for 20 , where 5 is input time-stamps and 20 is feature.
Can I used this trained model in such a way that from end-user if I get an input for 1 feature, model should be able to predict that 1 feature.
Because now I need to get an input for all 20 features in order to predict anything, I don't want that.
Does the problem makes sense?Could you help me?
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.