Skip to content
New issue

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

A problem about LSTM learning #141

Closed
LinRick opened this issue Jun 18, 2019 · 2 comments
Closed

A problem about LSTM learning #141

LinRick opened this issue Jun 18, 2019 · 2 comments

Comments

@LinRick
Copy link

LinRick commented Jun 18, 2019

Dear sir,
When I use the following LSTM architecture along with keras/elephas, as:
conf = SparkConf().setAppName('RNN_LSTM_Elephas_App').setMaster('spark://master:7077')

one driver and four workers

sc = SparkContext(conf=conf)

rdd = to_simple_rdd(sc, train_X, train_y)

model = Sequential()
model.add(LSTM(32, input_shape=(train_X.shape[1],train_X.shape[2]), activation='tanh', kernel_initializer='lecun_uniform'))
model.add(Dense(1))
model.compile(loss="mse", optimizer='adam')
sparkRNN_model = SparkModel(model, frequency='epoch', mode='asynchronous')
sparkRNN_model.fit(rdd, epochs = 150, batch_size = 32, verbose = 2, validation_split = 0.1)

The predicting results are the same values as follows:
array([[33.390114],
[33.390114],
[33.390114],
[33.390114],
..., [33.390114]]

By the way, when I use setMaster('local[*]'), the results are different values.
Hence, I have no idea about this problem.

Rick

@danielenricocahall
Copy link
Collaborator

Elephas currently doesn't support LSTM training/prediction - it can be added if enough users request it! Although I would definitely want some assistance/feedback.

@danielenricocahall
Copy link
Collaborator

Moved this issue to the new fork: danielenricocahall#10. Closing this for now but still on the radar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants