Merge pull request #35019 from foxik:on_batch_methods_relax_shapes
PiperOrigin-RevId: 285685827 Change-Id: Ic54760c3e6afeb1939b5c2a96e3d3694b57efbef
This commit is contained in:
commit
08c45ed0c5
@ -119,7 +119,9 @@ def _make_on_batch_function(model, mode):
|
||||
func = model
|
||||
|
||||
if not model.run_eagerly:
|
||||
func = def_function.function(func)
|
||||
# Pass `experimental_relax_shapes` to avoid retracing for dynamic batch
|
||||
# size, variable length sequences, etc.
|
||||
func = def_function.function(func, experimental_relax_shapes=True)
|
||||
|
||||
return func
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user