Question

I have a Keras model. which is defined as follows:

nn_model = Sequential()
nn_model.add(Dense(300, activation="relu",input_shape=(4,))) # because we have 4 features
nn_model.add(Dropout(0.3))
nn_model.add(Dense(150, activation="relu"))
nn_model.add(Dense(50, activation="relu"))
nn_model.add(Dense(30, activation="relu"))
nn_model.add(Dense(1))

optimizer = optimizers.RMSprop(0.001)      
nn_model.compile(loss='mse',optimizer=optimizer,metrics=['mae']) 

This model is used as a regressor for predicting a certain pattern. For the SAME training and testing data AND SAME code, the model is making two entirely different predictions on two different hardwares. In one case, the weights become entirely corrupt and makes flat predictions (training data has no flat curve).

Versions of libraries being used are same on both the machines.

Here are the specs of two machines:

Correct predictions machine: Lenovo ThinkPad E570 model type: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz

Wrong prediction (AWS VM): Machine type: c5.large

Can anyone point out any reason of which this might be happening?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange
scroll top