Comments (8)
Worked perfectly - time to tune.
Thanks again.
from keras.
I'm not sure this is very different form the examples.
I would input this as a 3D array:
- dimension 1 is n: the number of observations you have (probably you wont have to specify this for now)
- dimension 2 is 2: the time step (t0 and t1)
- dimension 3 is 110: the features you have
You will input a matrix for each individual/observation in your dataset.
Does it make sense for you?
from keras.
Hi Dean,
There is a lot of python examples out there, and most of them can be quite understandable and translatable to R, even if you don't much about Python per se (like me).
I think you supply X as a 3D array of dimensions [samples, timesteps, features]. So you would have [samples, 2, 110]. Y is then a matrix without time dimension (you are predicting a single value), and so has dimension [samples, features]. For a binary outcome you could have a model that looks like:
keras_model_sequential() %>%
layer_lstm(units = 16, input_shape = c(2, 110)) %>%
layer_dense(units = 1) %>%
layer_activation('sigmoid') %>%
compile(loss = 'binary_crossentropy',
optimizer = 'adam',
metrics = 'accuracy')
from keras.
Trying to make a run at your suggestions today. Thanks for the feedback - very helpful.
from keras.
Hey, I am also trying to work around a similar thing but I am getting an error :
Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: No data provided for "gru_21_input". Need data for each key in: ['gru_21_input']
Will it be possible for you to share a detailed snippet around how do you define a shape of the data before one runs the model fit on the training dataset?
Thanks
from keras.
Hello,
I'd suggest you provide a minimal executable example so we can see what goes wrong in your case?
from keras.
dimension 1 is n: the number of observations you have (probably you wont have to specify this for now)
dimension 2 is 2: the time step (t0 and t1)
dimension 3 is 110: the features you have
For dimension 2, I did not find any information mentioning if the sequence should be in chronological or reverse chronological order. For example if we have 5 time steps, in cell [1,1,1] we should have today's sample and in cell [1,5,1] the oldest sample of our timeframe window? Or it should be in the opposite order?
from keras.
@mioan-gr Please open a new issue if you're encountering problems, and include a link to this issue if appropriate. This issue was closed 7 years ago!
from keras.
Related Issues (20)
- After update, MWE does not produce same/similar output anymore (fit() or predict() problem) HOT 2
- Installation Issue HOT 7
- metric_binary_iou is not available HOT 2
- layer_dense() error : ValueError HOT 2
- Trouble with compiling my keras_model_sequential() HOT 7
- RuntimeError: invalid 'type' (environment) of argument HOT 8
- Conflict Arguments Between R and Python: Error in py_call_impl(callable, call_args$unnamed, call_args$named) HOT 20
- ValueError: Only input tensors may be passed as positional arguments HOT 5
- Release keras3 0.2.0
- Release keras 2.15.0
- Erreur dans UseMethod("compile") HOT 7
- Can't load the LSTM model pre-trained in Python to R HOT 1
- Difference between R and Python output HOT 7
- Segmentation models HOT 2
- Lack of methods text_tokenizer(), fit_text_tokenizer() and texts_to_sequences() HOT 5
- compile function does not work HOT 3
- keras layer dense problem HOT 2
- Whe I have tried to fit model I got a problem that I could not understand. Can you look at it?
- Release keras3 0.3.0
- Release keras3 1.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras.