1

here is my test code `

from tensorflow.python.keras.layers import Conv1D, MaxPooling1D
from tensorflow.python.keras.models import Model
import logging
level = logging.getLevelName('INFO')
logging.getLogger().setLevel(level)
model = tf.keras.Sequential()
output = Dense(2, activation="softmax")
model.add(Dense(64, activation="relu", input_shape=(10,)))
model.add(output)
model.compile('rmsprop', 'categorical_crossentropy')
est_model = tf.keras.estimator.model_to_estimator(keras_model=model)
train_input_fn = tf.estimator.inputs.numpy_input_fn(
        x={"dense_2_input": np.random.randint(10, size=(320, 10))},
        y=np.random.rand(320, 2),
        num_epochs=10000,
        shuffle=False)
est_model.train(train_input_fn)

My TF_CONFIG is `

TF_CONFIG={
"cluster": {"chief": ["localhost:2223"], 
"worker": ["localhost:2221"], 
"ps": ["lcoalhost:2222"]}, 
"task": {"index": "0", "type": "chief"}
}

The chief is stuck on logging Restoring paramater from ...... and no ports is listening.

Any suggestion?

1
  • I'm using train_and_eval instead of train method. It works fine.
    – Guozhen
    Aug 11, 2018 at 8:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.