我已经训练了一个多标签(2),多类(3)模型与keras和model.predict(test_data)给3(num_samples,1)ndarray ...到目前为止这么好,但我怎么能检查哪个类的预测数组: 我的模型架构是:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
namespace ConsoleApplication1
{
class Program
{
const string FILENAME = @"c:\temp\test.xml";
static void Main(string[] args)
{
List<List<KeyValuePair<string, string>>> books = new List<List<KeyValuePair<string, string>>>();
using (XmlReader reader = XmlReader.Create(FILENAME))
{
while (!reader.EOF)
{
if (reader.Name != "Section")
{
reader.ReadToFollowing("Section");
}
if (!reader.EOF)
{
XElement section = (XElement)XElement.ReadFrom(reader);
List<KeyValuePair<string, string>> book = new List<KeyValuePair<string, string>>();
books.Add(book);
foreach (XElement b in section.Elements())
{
book.Add(new KeyValuePair<string, string>(b.Name.LocalName, (string)b.Attribute("Name")));
}
}
}
}
}
}
}
Keras docs仅提到predict()返回'Numpy数组预测',但没有提及维护订单。谢谢,