Read and write tf.Example
values from a file. The format is described
here.
] add https://github.com/contradict/TFRecords.jl
Installation fetches the .proto
files defining the data format from the github
Tensorflow repository, so network access is needed to build. See deps/build.jl
for the gory details.
julia> using TFRecords
julia> tfrecord_file = TFRecord("filename.tfrecord")
julia> records = Iterators.Stateful(tfrecord_file)
julia> record = popfirst!(records)
For convenience, parse_example
will turn the Example
structure into a
Dict{String, Array{T, 1}}
for.
julia> record_dict = parse_example(record)
julia> output_file = open("filename.tfrecord")
julia> e = build_example(Dict("value" => Array{Int64, 1}([1])))
julia> writeexample(outputfile, e)