我想使用 tf.data.Dataset.list_files 函数来提供我的数据集。
但是因为文件不是图像,我需要手动加载它。
问题是 tf.data.Dataset.list_files 将变量作为 tf.tensor 传递,而我的 python 代码无法处理张量。
如何从 tf.tensor 获取字符串值。dtype 是字符串。
train_dataset = tf.data.Dataset.list_files(PATH+'clean_4s_val/*.wav')
train_dataset = train_dataset.map(lambda x: load_audio_file(x))
def load_audio_file(file_path):
print("file_path: ", file_path)
# i want do something like string_path = convert_tensor_to_string(file_path)
Run Code Online (Sandbox Code Playgroud)
file_path 是 Tensor("arg0:0", shape=(), dtype=string)
我使用 tensorflow 1.13.1 和 Eager 模式。
提前致谢
我正在使用Meteor和Meteor UP进行部署.到现在为止还挺好.我可以将我的项目部署到我的测试Ubuntu服务器.
我的问题是我不知道如何在服务器上调试.如果我使用node.js和express,我可以编写console.log("some error")来查看日志.
日志文件似乎是/var/log/upstart/.log但我只能找到
>> stepping down to gid: meteoruser
>> stepping down to uid: meteoruser
Run Code Online (Sandbox Code Playgroud)
有没有办法输出"console.log(something)"?
我使用Ubuntu-14.04和Meteor 1.1.0.2.