我正在尝试使用自定义输入函数进行预测estimator.predict,但它给了我:
WARNING:tensorflow:Input graph does not contain a QueueRunner. That means predict yields forever. This is probably a mistake.
它没有给我一个错误,但predict只是说它的恢复参数并没有返回实际的预测.这是我的代码:
test_data = [0.03, 0.91, 0.95, 0.10, 0.56, 0.93]
test_data_in = { k: test_data[index] for index, k in enumerate(FEATURES) }
print(test_data_in)
def predict_input_fn(data_set):
feature_cols = { k: tf.reshape(tf.constant(data_set[k], dtype=tf.float32), [-1]) for k in FEATURES }
return feature_cols
predictions = estimator.predict(input_fn=lambda: predict_input_fn(test_data_in))
print(list(predictions))
Run Code Online (Sandbox Code Playgroud)
我看过这个问题,但是我找不到与我的问题相关的解决方案.为什么TensorFlow会显示此警告,如何摆脱它?
我在Vue组件中有一个使用firebase登录用户的登录方法.我使用的计算性能user,message以及hasErrors.当这个方法运行时,它进入catch函数,但是这个错误出现了:
Uncaught TypeError: Cannot set property 'message' of undefined.我已经尝试直接更改vuex状态(因为这是计算的prop所做的),但这会产生相同的错误.这是我正在使用的方法:
login: function (event) {
// ... more stuff
// Sign-in the user with the email and password
firebase.auth().signInWithEmailAndPassword(this.email, this.password)
.then(function (data) {
this.user = firebase.auth().currentUser
}).catch(function (error) {
this.message = error.message
this.hasErrors = true
})
// ...
}
Run Code Online (Sandbox Code Playgroud)
这是计算的道具的样子:
message: {
get () {
return this.auth.message // mapState(['auth'])
},
set (value) {
this.$store.commit('authMessage', value)
}
}
Run Code Online (Sandbox Code Playgroud)
我很确定这个问题与它内部的问题有关Promise.那么如何在firebase中访问计算属性Promise呢?
我想分割特殊字符“\”。但是,使用它似乎不起作用
a.split("\");
Run Code Online (Sandbox Code Playgroud)
或者
a.split("\\");
Run Code Online (Sandbox Code Playgroud) 我正在用 JavaFX 搞游戏编程,我为图形制作了一个 spritesheet。目前,我正在将 JavaFX 更改Image为 a BufferedImage,然后使用该BufferedImage#subImage函数获取子图像,然后使用SwingFXUtils将其更改回 JavaFX Image。我试图寻找一种更简单的方法,但还没有找到。他们是获取 JavaFX 子映像的更简单方法吗?
java ×2
image ×1
javafx ×1
javafx-8 ×1
javascript ×1
python ×1
split ×1
tensorflow ×1
vue.js ×1