File size: 607 Bytes
a00ee36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% Copyright (c) Facebook, Inc. and its affiliates.
% All rights reserved.
%
% All contributions by Andy Brock:
% Copyright (c) 2019 Andy Brock
%
% MIT License
%
function [itr, IS, FID, t] = process_inception_log(fname, which_log)
f = sprintf('%s_%s',fname, which_log);%'G_loss.log');
fid = fopen(f,'r');
itr = [];
IS = [];
FID = [];
t = [];
i = 1;
while ~feof(fid);
    s = fgets(fid);
    parsed = sscanf(s,'{"itr": %d, "IS_mean": %f, "IS_std": %f, "FID": %f, "_stamp": %f}');
    itr(i) = parsed(1);
    IS(i) = parsed(2);
    FID(i) = parsed(4);
    t(i) = parsed(5);
    i = i + 1;
end
fclose(fid);
end