You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you so much for this repo. When using models with multiple models this code will fail obviously. Here is how to do it for multiple inputs. Wasn't sure where to PR so just opening this issue to help others trying the same.
full_model=tf.function(lambdax: model(x))
get_concrete_func_x= []
foriinrange(len(model.inputs)):
get_concrete_func_x.append(
tf.TensorSpec(
model.inputs[i].shape,
model.inputs[i].dtype,
name=model.inputs[i].name
)
)
# basically x should be a TensorSpec or tuple of them.# don't put a generator directly or it will fail too.get_concrete_func_x=tuple(get_concrete_func_x)
full_model=full_model.get_concrete_function(x=get_concrete_func_x)
The text was updated successfully, but these errors were encountered:
Thank you so much for this repo. When using models with multiple models this code will fail obviously. Here is how to do it for multiple inputs. Wasn't sure where to PR so just opening this issue to help others trying the same.
The text was updated successfully, but these errors were encountered: