diff options
author | 2018-08-01 15:31:59 -0700 | |
---|---|---|
committer | 2018-08-01 15:39:35 -0700 | |
commit | 72691c24e222aaff5681a718cbe96eb1436e4971 (patch) | |
tree | 63ada2c7db01ad3efdaa92cc7f3f96a4c8e0fa87 /tensorflow/python/lib | |
parent | f0dca8794d5c7cfb398d7abcc5b1a0f05960d231 (diff) |
When model.build() is called on tf.TensorShape((None, None, None, 1)), the code replaces the None values with 1 and the model is then built with the shape of (1, 1, 1, 1). This sets the variables of the model and hence we cannot call the model on input of shape other than (1, 1, 1, 1).
In this CL, we create placeholders for the None values and build the model in graph mode. Since tf.Variable is now compatible with both eager and graph mode, the variables created after building the model in graph mode are still valid in eager mode. Now we can build the model with None's in the input shape and the model can still be called on a different shape input due to placeholders.
PiperOrigin-RevId: 207005479
Diffstat (limited to 'tensorflow/python/lib')
0 files changed, 0 insertions, 0 deletions