cerndb / dist-keras

Distributed Deep Learning, with a focus on distributed training, using Keras and Apache Spark.
http://joerihermans.com/work/distributed-keras/
GNU General Public License v3.0
623 stars 169 forks source link

Model is not getting trained properly #67

Open sujit420 opened 6 years ago

sujit420 commented 6 years ago

I am trying to integrate standard algos of Collaborative filtering e.g. Matix Factorization(MF),NNMF,NMF etc. using dist-keras. Everything runs successfully, but all prediction output is 0. On the other hand if i run same code separately only using keras, i get all predictions fine.

  1. trainer = ADAG(keras_model=model, worker_optimizer=self.optimizer, loss=self.loss, num_workers=self.num_workers, batch_size=16, communication_window=5,num_epoch=100, features_col=['userId','movieId'], label_col="rating")

trained_model = trainer.train(dataset) This runs successfully but doesnt give any prediction other than 0 value

  1. model.fit(x=[train.userId,train.movieId],y=train.rating,batch_size=64,epochs=5) This runs as usual with all correct predictions.

Can anyone please guide me what I am doing wrong here?