Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Is it possible to implement dist-keras and run in local machine for this Keras Model #72

Open
@mohaimenz

Description

Hi @JoeriHermans,
I am reading the documentation of this repository. My experimental setup runs on Theano for accuracy reproducibility. Now, I need to train my model in distributed fashion on multiple nodes. I tried ELEPHAS as it asks for least amount of change and it also runs on Theano. However, I failed to run my experiment with that. Now, I am looking at your API and it seems that I will have to rewrite my whole experiment. I am putting my model here. It would be great to have your suggestion in this regard. I also would like to know if it is possible to run the dist-keras implementation in my local machine. My local machine has 8 cores and one 4GB NVIDIA GPU.

model = Sequential();
model.add(Dropout(0.2, input_shape=(122,)));
model.add(Dense(150, kernel_initializer='normal', activation='relu', kernel_constraint=maxnorm(3)));
model.add(Dropout(0.5));
model.add(Dense(120, kernel_initializer='normal', activation='relu', kernel_constraint=maxnorm(3)));
model.add(Dropout(0.5));
model.add(Dense(50, kernel_initializer='normal', activation='relu', kernel_constraint=maxnorm(3)));
model.add(Dropout(0.5));
model.add(Dense(2, kernel_initializer='normal', activation='sigmoid'));

sgd = SGD(lr=0.1, momentum=0.9, decay=1e-6, nesterov=True);
model.compile(loss='mean_squared_error', optimizer=sgd, metrics=['accuracy']);
###trainX, trainY, testX, testY are all numpy variables where categorical values are discretized by one-hot ###encoding and normalized using z-score normalization using sklearn.preprocessing
model.fit(trainX, trainY, epochs=50, batch_size=32, shuffle=True, verbose=1);
testYPredicted = model.predict(testX, batch_size=32);

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions