您好我正在尝试在 IBMcloud 中使用 systemml 进行 keras 并行化,但是当我运行代码时:
sysml_model = Keras2DML(spark, keras_Model, input_shape=(1,1), weights='weights_dir', batch_size=batch_size, max_iter=max_iter, test_interval=0, display=10)
我得到 fowlloing 错误,你能帮我解决任何问题吗:
<ipython-input-20-772087af6a08> in <module>()
4 samples = train.count()
5 max_iter = int(epochs*math.ceil(samples/batch_size))
----> 6 sysml_model = Keras2DML(spark, keras_Model, input_shape=(1,1), weights='weights_dir', batch_size=batch_size, max_iter=max_iter, test_interval=0, display=10)
7 sysml_model.fit(train[1], train[3])
/home/spark/shared/user-libs/python3.6/systemml/mllearn/estimators.py in __init__(self, sparkSession, keras_model, input_shape, transferUsingDF, load_keras_weights, weights, labels, batch_size, max_iter, test_iter, test_interval, display, lr_policy, weight_decay, regularization_type)
1033 regularization_type: regularization type (default: "L2")
1034 """
-> 1035 from .keras2caffe import convertKerasToCaffeNetwork, convertKerasToCaffeSolver, convertKerasToSystemMLModel
1036 import tempfile, keras
1037 if keras.backend.image_data_format() != 'channels_first':
/home/spark/shared/user-libs/python3.6/systemml/mllearn/keras2caffe.py in <module>()
26 import os
27 import math
---> 28 from itertools import chain, imap
29 from ..converters import *
30 from ..classloader import *
ImportError: cannot import name 'imap'