本文整理汇总了Java中org.datavec.api.records.metadata.RecordMetaData.getURI方法的典型用法代码示例。如果您正苦于以下问题:Java RecordMetaData.getURI方法的具体用法?Java RecordMetaData.getURI怎么用?Java RecordMetaData.getURI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.datavec.api.records.metadata.RecordMetaData
的用法示例。
在下文中一共展示了RecordMetaData.getURI方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadFromMetaData
import org.datavec.api.records.metadata.RecordMetaData; //导入方法依赖的package包/类
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
List<Record> out = new ArrayList<>();
for (RecordMetaData metaData : recordMetaDatas) {
URI uri = metaData.getURI();
String fileAsString;
try {
fileAsString = FileUtils.readFileToString(new File(uri.toURL().getFile()));
} catch (IOException e) {
throw new RuntimeException("Error reading URI file", e);
}
List<Writable> writables = readValues(uri, fileAsString);
out.add(new org.datavec.api.records.impl.Record(writables, metaData));
}
return out;
}
示例2: loadFromMetaData
import org.datavec.api.records.metadata.RecordMetaData; //导入方法依赖的package包/类
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
List<Record> out = new ArrayList<>();
for (RecordMetaData meta : recordMetaDatas) {
URI uri = meta.getURI();
File f = new File(uri);
List<Writable> next;
try (DataInputStream dis = new DataInputStream(new BufferedInputStream(new FileInputStream(f)))) {
next = record(uri, dis);
}
out.add(new org.datavec.api.records.impl.Record(next, meta));
}
return out;
}
示例3: loadSequenceFromMetaData
import org.datavec.api.records.metadata.RecordMetaData; //导入方法依赖的package包/类
@Override
public List<SequenceRecord> loadSequenceFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
List<SequenceRecord> out = new ArrayList<>();
for (RecordMetaData meta : recordMetaDatas) {
File f = new File(meta.getURI());
List<List<Writable>> list = loadData(f, null);
out.add(new org.datavec.api.records.impl.SequenceRecord(list, meta));
}
return out;
}
示例4: loadFromMetaData
import org.datavec.api.records.metadata.RecordMetaData; //导入方法依赖的package包/类
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
List<Record> out = new ArrayList<>();
for (RecordMetaData meta : recordMetaDatas) {
URI uri = meta.getURI();
File f = new File(uri);
List<Writable> list = loadFromFile(f);
out.add(new org.datavec.api.records.impl.Record(list, meta));
}
return out;
}
示例5: loadSequenceFromMetaData
import org.datavec.api.records.metadata.RecordMetaData; //导入方法依赖的package包/类
@Override
public List<SequenceRecord> loadSequenceFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
List<SequenceRecord> out = new ArrayList<>();
for (RecordMetaData meta : recordMetaDatas) {
File next = new File(meta.getURI());
URI uri = next.toURI();
String fileContents = FileUtils.readFileToString(next, charset.name());
List<List<Writable>> sequence = loadSequence(fileContents, uri);
out.add(new org.datavec.api.records.impl.SequenceRecord(sequence, meta));
}
return out;
}
示例6: loadSequenceFromMetaData
import org.datavec.api.records.metadata.RecordMetaData; //导入方法依赖的package包/类
@Override
public List<SequenceRecord> loadSequenceFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
List<SequenceRecord> out = new ArrayList<>();
for (RecordMetaData meta : recordMetaDatas) {
File next = new File(meta.getURI());
List<List<Writable>> sequence = loadAndClose(new FileInputStream(next));
out.add(new org.datavec.api.records.impl.SequenceRecord(sequence, meta));
}
return out;
}