Skip to content
  • Zachary Garrett's avatar
    Don't rely on variable names for type signatures, as TF may invoke some · 13c5a443
    Zachary Garrett authored
    de-duplication strategy in non-eager mode.
    
    TF, under certain circumstances, prepends `_#` numbers to variables with the
    same name. This appears to happen in non-eager mode and in some occasions with
    Keras. TFF previously used these names for the type signature, which would
    cause problems when the same model was created more than once in the same graph
    context.
    
    Instead, rely on the ordering of the sequence of variables contained in the
    model and use the unnamed structure for types.
    
    PiperOrigin-RevId: 285032395
    13c5a443