public class LogFileWriter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LogFileWriter.EventSubtype |
static class |
LogFileWriter.StaticInfo |
Constructor and Description |
---|
LogFileWriter(File file) |
Modifier and Type | Method and Description |
---|---|
protected int |
encodeGraphStructure(com.google.flatbuffers.FlatBufferBuilder fbb,
SameDiff sd) |
protected Pair<Integer,com.google.flatbuffers.FlatBufferBuilder> |
encodeStaticHeader(byte type)
Encode the header as a UIStaticInfoRecord instance for the specific
UIEventType |
List<Pair<UIEvent,com.google.flatbuffers.Table>> |
readEvents()
Read all of the events.
|
List<Pair<UIEvent,com.google.flatbuffers.Table>> |
readEvents(long startOffset)
Read all of the events starting at a specific file offset
|
LogFileWriter.StaticInfo |
readStatic()
Read all static information at the start of the file
|
boolean |
registeredEventName(String name) |
long |
registerEventName(String name)
Register the event name - "accuracy", "loss", etc for later use in recording events.
|
long |
registerEventNameQuiet(String name) |
long |
writeFinishStaticMarker()
Write marker for final static data
|
long |
writeGraphStructure(SameDiff sd)
Write the graph structure
|
long |
writeHistogramEventCustomBins(String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
INDArray bins,
INDArray y) |
long |
writeHistogramEventDiscrete(@NonNull String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
List<String> binLabels,
@NonNull INDArray y) |
long |
writeHistogramEventEqualSpacing(String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
double min,
double max,
INDArray y) |
long |
writeScalarEvent(String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
Number scalar)
Write a single scalar event to the file
|
public LogFileWriter(File file) throws IOException
IOException
public long writeGraphStructure(SameDiff sd) throws IOException
sd
- SameDiff instance to write the graph structure forIOException
public long writeFinishStaticMarker() throws IOException
IOException
public LogFileWriter.StaticInfo readStatic() throws IOException
IOException
public List<Pair<UIEvent,com.google.flatbuffers.Table>> readEvents() throws IOException
IOException
public List<Pair<UIEvent,com.google.flatbuffers.Table>> readEvents(long startOffset) throws IOException
IOException
public boolean registeredEventName(String name)
public long registerEventNameQuiet(String name)
public long registerEventName(String name) throws IOException
name
- Name to registerIOException
public long writeScalarEvent(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, Number scalar) throws IOException
name
- Name of the event. Must be registered by registerEventName(String)
first!time
- Timestampiteration
- Iteration for the eventepoch
- Epoch for the eventscalar
- Scalar value to writeIOException
public long writeHistogramEventDiscrete(@NonNull @NonNull String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, List<String> binLabels, @NonNull @NonNull INDArray y) throws IOException
IOException
public long writeHistogramEventEqualSpacing(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, double min, double max, INDArray y) throws IOException
IOException
public long writeHistogramEventCustomBins(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, INDArray bins, INDArray y) throws IOException
IOException
protected Pair<Integer,com.google.flatbuffers.FlatBufferBuilder> encodeStaticHeader(byte type)
UIEventType
type
- UIEventTypeprotected int encodeGraphStructure(com.google.flatbuffers.FlatBufferBuilder fbb, SameDiff sd)
Copyright © 2020. All rights reserved.