federated/tests/training_loops_test.py
def create_tff_model(self) -> TYPE:
        """Function for creating TFF model.

        Returns:
            self.TYPE: TFF Model.
        """
        input_spec = self.TYPE(
            x=tf.TensorSpec(shape=[None, 784], dtype=tf.float32),
            y=tf.TensorSpec(shape=[None, 1], dtype=tf.int64),
        )

        return tff.learning.from_keras_model(
            keras_model=tff.simulation.models.mnist.create_keras_model(
                compile_model=False
            ),
            input_spec=input_spec,
            loss=tf.keras.losses.SparseCategoricalCrossentropy(),
        )
Function for creating TFF model.

        Returns:
            self.TYPE: TFF Model.
        
Function for creating TFF model.
Function for creating TFF model .
def create_tff_model(self) -> TYPE:
        input_spec = self.TYPE(
            x=tf.TensorSpec(shape=[None, 784], dtype=tf.float32),
            y=tf.TensorSpec(shape=[None, 1], dtype=tf.int64),
        )
        return tff.learning.from_keras_model(
            keras_model=tff.simulation.models.mnist.create_keras_model(
                compile_model=False
            ),
            input_spec=input_spec,
            loss=tf.keras.losses.SparseCategoricalCrossentropy(),
        )
def create_tff_model ( self ) -> TYPE : input_spec = self . TYPE ( x = tf . TensorSpec ( shape = [ None , 784 ] , dtype = tf . float32 ) , y = tf . TensorSpec ( shape = [ None , 1 ] , dtype = tf . int64 ) , ) return tff . learning . from_keras_model ( keras_model = tff . simulation . models . mnist . create_keras_model ( compile_model = False ) , input_spec = input_spec , loss = tf . keras . losses . SparseCategoricalCrossentropy ( ) , )
Function for creating TFF model.
Function for creating TFF model .
"""Function for creating TFF model.

        Returns:
            self.TYPE: TFF Model.
        """
None
self.TYPE
self