For learning purposes:
I am using a tf1 code as a reference for developing a model. In the reference code, they used tf.placeholder to give input to the model and the code is
class model(object): def __init__(self, lstm_size, batch_len, output_nodes, keep_prob, learning_rate=0.001): self.inputs_ = tf.compat.v1.placeholder(tf.float32, shape=[batch_len, None, 512], name='lstm_inputs') self.targets_ = tf.compat.v1.placeholder(tf.int32, [batch_len], name='lstm_targets')
The execution mode of this model is Graph Execution(tf.Graph).
Since I want to convert and run the code in eager execution. But, the tf.placeholder will not work in eager execution. How can I replace the tf.placeholder without affecting the input name , dtype, and shape of the input value for sake of eager execution.!
Again I need it to convert for eager execution.
I will be thankful if anyone helps me out.