(self, var_or_local_name: Union[TfExpression, str], new_value: Union[int, float, np.ndarray])
Set the value of a given variable based on the given NumPy array.
        Note: This method is very inefficient -- prefer to use tflib.set_vars() whenever possible.
Set the value of a given variable based on the given NumPy array.
        Note: This method is very inefficient -- prefer to use tflib.set_vars() whenever possible.
Set the value of a given variable based on the given NumPy array . Note : This method is very inefficient -- prefer to use tflib . set_vars () whenever possible .
def set_var(self, var_or_local_name: Union[TfExpression, str], new_value: Union[int, float, np.ndarray]) -> None:
        """Set the value of a given variable based on the given NumPy array.
        Note: This method is very inefficient -- prefer to use tflib.set_vars() whenever possible."""
        tfutil.set_vars({self.find_var(var_or_local_name): new_value})
def set_var ( self , var_or_local_name : Union [ TfExpression , str ] , new_value : Union [ int , float , np . ndarray ] ) -> None : tfutil . set_vars ( { self . find_var ( var_or_local_name ) : new_value } )