为什么精度没有提高

问题描述

我使用TFF 0.12.0 ,并且使用VGG16运行了用于图像分类的联合学习代码,这是我的代码的一部分:

def create_compiled_keras_model():
    layer1 = tf.keras.layers.GlobalAveragePooling2D()(output)
    layer1 = tf.keras.layers.Dense(units=256)(output)
    model_output = tf.keras.layers.Dense(units=2,activation='relu')(layer1)
    model = tf.keras.Model(model.input,model_output)
    return model

def model_fn():
     keras_model = create_compiled_keras_model()
     return tff.learning.from_keras_model(keras_model,sample_batch,loss=tf.keras.losses.CategoricalCrossentropy(),metrics=[tf.keras.metrics.CategoricalAccuracy()]) 

奔跑后,知道我初始化了100发子弹,准确性并没有提高。

round  1,metrics=<categorical_accuracy=0.5,loss=8.059043884277344,keras_training_time_client_sum_sec=0.0>
round  2,loss=8.059045791625977,keras_training_time_client_sum_sec=0.0>
round  3,loss=8.05904769897461,keras_training_time_client_sum_sec=0.0>
round  4,keras_training_time_client_sum_sec=0.0>
round  5,keras_training_time_client_sum_sec=0.0>
round  6,keras_training_time_client_sum_sec=0.0>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...