tensorflow2在获取中间层输出的时候出现层未连接错误 Layer sequential_19 is not connected, no input to return.
原始代码:#训练#deftrain():#构建网络network=keras.Sequential([keras.layers.Dense(128,'relu'),#,input_shape=(28*28,)keras.layers.Dense(10)])network.build(input_shape=(None,28*28))#network.summary()network.compile