Closed qgking closed 6 years ago
i found the model.py source code of keras 1.2.2 from dmlc, and changed the code, compile, install loss = deserialize(training_config['loss']) metrics = deserialize(training_config['metrics']) sample_weight_mode = training_config['sample_weight_mode'] loss_weights = training_config['loss_weights'] gpu_list = ["gpu(0)","gpu(1)","gpu(2)","gpu(3)"]
model.compile(optimizer=optimizer,
loss=loss,
metrics=metrics,
loss_weights=loss_weights,
sample_weight_mode=sample_weight_mode,context=gpu_list)
emmmm,,,,it works!! ahaha
I have trained model using multi-gpu. while in the prediction phase.I found that this code did not working on GPU model_cnn.predict(train_set, batch_size=CFG['batch_size']) so,how can i run predict on GPU