(self, var_or_local_name: Union[TfExpression, str])
return self.vars[var_or_local_name] if isinstance(var_or_local_name, str) else var_or_local_name
Find variable by local or global name.
Find variable by local or global name.
Find variable by local or global name .
def find_var(self, var_or_local_name: Union[TfExpression, str]) -> TfExpression:
        """Find variable by local or global name."""
        assert tfutil.is_tf_expression(var_or_local_name) or isinstance(var_or_local_name, str)
        return self.vars[var_or_local_name] if isinstance(var_or_local_name, str) else var_or_local_name
def find_var ( self , var_or_local_name : Union [ TfExpression , str ] ) -> TfExpression : assert tfutil . is_tf_expression ( var_or_local_name ) or isinstance ( var_or_local_name , str ) return self . vars [ var_or_local_name ] if isinstance ( var_or_local_name , str ) else var_or_local_name