【问题标题】:Torch image.load() doesn't work well with named pipesTorch image.load() 不适用于命名管道
【发布时间】:2017-04-11 09:43:54
【问题描述】:

重现这个:

require 'image'
img = image.load('input_pipe')
image.display(img)

在另一个终端上,运行:

mkfifo input_pipe
cat <image_file> > input_pipe

请注意,调用cat &lt;image_file&gt; &gt; input_pipe 一次不会加载图像。你必须调用它两次。我的猜测是image.load 会打开文件两次。任何帮助/替代方案将不胜感激。

【问题讨论】:

    标签: deep-learning torch


    【解决方案1】:

    回复here。显然,image.load() 打开图像文件以找出文件类型,然后再次打开它以调用相应的图像加载器,例如image.loadJPG()

    【讨论】:

      猜你喜欢
      • 2021-07-23
      • 2010-10-16
      • 2012-11-12
      • 2023-03-22
      • 2016-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多