federated/tests/rfa_test.py
def create_model(self) -> tf.keras.Model:
        """Creates model for RFA tests.

        Returns:
            tf.keras.Model: Model.
        """

        def create_model_fn():
            keras_model = tf.keras.models.Sequential(
                [
                    tf.keras.layers.Input(shape=(10,)),
                    tf.keras.layers.Dense(
                        1, kernel_initializer="zeros", use_bias=False
                    ),
                ]
            )

            return tff.learning.from_keras_model(
                keras_model=keras_model,
                input_spec=self.get_test_data()[0].element_spec,
                loss=tf.keras.losses.MeanSquaredError(),
            )

        return create_model_fn
Creates model for RFA tests.

        Returns:
            tf.keras.Model: Model.
        
Creates model for RFA tests.
Creates model for RFA tests .
def create_model(self) -> tf.keras.Model:
        def create_model_fn():
            keras_model = tf.keras.models.Sequential(
                [
                    tf.keras.layers.Input(shape=(10,)),
                    tf.keras.layers.Dense(
                        1, kernel_initializer="zeros", use_bias=False
                    ),
                ]
            )
            return tff.learning.from_keras_model(
                keras_model=keras_model,
                input_spec=self.get_test_data()[0].element_spec,
                loss=tf.keras.losses.MeanSquaredError(),
            )
        return create_model_fn
def create_model ( self ) -> tf . keras . Model : def create_model_fn ( ) : keras_model = tf . keras . models . Sequential ( [ tf . keras . layers . Input ( shape = ( 10 , ) ) , tf . keras . layers . Dense ( 1 , kernel_initializer = "zeros" , use_bias = False ) , ] ) return tff . learning . from_keras_model ( keras_model = keras_model , input_spec = self . get_test_data ( ) [ 0 ] . element_spec , loss = tf . keras . losses . MeanSquaredError ( ) , ) return create_model_fn
Creates model for RFA tests.
Creates model for RFA tests .
"""Creates model for RFA tests.

        Returns:
            tf.keras.Model: Model.
        """
None
tf.keras.Model
self