TensorFlowNET:TransferLearningWithInceptionV3 示例中的 IndexOutOfRangeException

TensorFlowNET: IndexOutOfRangeException in TransferLearningWithInceptionV3 example

在执行 TransferLearningWithInceptionV3 时抛出 IndexOutOfRangeException。

SciSharp-Stack-Examples 的版本从 2022 年 1 月 8 日开始。

The screenshot with exception

在框架中,他们使用特征向量缓存并将其作为comma-separated floats的序列存储在txt中。

但在我的文化中,小数点分隔符也是逗号。所以这个文件读错了

如果应用以点分隔小数部分的文化,可以修复错误:

static void Main(string[] args)
{
  Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");