fabmilo
fabmilo

Reputation: 48330

Initialize placeholder if value is not provided

Is there an elegant way to specify a default value for a placeholder?

If you specify a value in the run(feed_dict=...) then uses that value otherwise it defaults to a given value that you specify at build time.

Upvotes: 5

Views: 2724

Answers (1)

fabmilo
fabmilo

Reputation: 48330

I just found it myself:

tf.placeholder_with_default(input, shape, name=None)

Upvotes: 8

Related Questions