Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Initialize placeholder if value is not provided

Tags:

tensorflow

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.

like image 231
fabrizioM Avatar asked Oct 18 '16 18:10

fabrizioM


1 Answers

I just found it myself:

tf.placeholder_with_default(input, shape, name=None)
like image 98
fabrizioM Avatar answered Oct 14 '22 15:10

fabrizioM