gpt4 book ai didi

python - Keras/Theano 输出

转载 作者:行者123 更新时间:2023-12-01 03:21:12 24 4
gpt4 key购买 nike

我正在与 theano 类型作斗争。

我创建了一些Sequential Keras 中的模型,最后一层是

final_model.add(Dense(1, activation='sigmoid'))

当我尝试时

final_model.get_output([x,x])
>>> sigmoid.0

如何获得实际的输出数量?我尝试使用 output.eval()分别。 output[0][0].eval()但这只会导致

theano.gof.fg.MissingInputError: ("An input of the graph, used to compute Shape(<TensorType(int32, matrix)>), was not provided and not given a value.Use the Theano flag exception_verbosity='high',for more information on this error.", <TensorType(int32, matrix)>)

最佳答案

不要被一杯水淹死。

给定输入值数组,您可以使用 Final_model.predict(input) 来获取预测数组。请注意,此函数可用于预测多于一组输入值。

关于python - Keras/Theano 输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41901978/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com