|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clc |
|
clear all |
|
close all |
|
fclose all; |
|
|
|
|
|
|
|
|
|
s = {}; |
|
d = dir(); |
|
j = 1; |
|
for i = 1:length(d) |
|
if any(strfind(d(i).name,'.jsonl')) |
|
s = [s; d(i).name]; |
|
end |
|
end |
|
|
|
|
|
j = 1; |
|
for i = 1:length(s) |
|
fname = s{i,1}; |
|
|
|
[itr, IS, FID, t] = process_inception_log(fname(1:end - 10), 'log.jsonl'); |
|
s{i,2} = itr; |
|
s{i,3} = IS; |
|
s{i,4} = FID; |
|
s{i,5} = max(IS); |
|
s{i,6} = min(FID); |
|
s{i,7} = t; |
|
end |
|
|
|
[IS_sorted, IS_index] = sort(cell2mat(s(:,5))); |
|
|
|
threshold = 22; |
|
IS_index = IS_index(IS_sorted > threshold); |
|
|
|
|
|
[FID_sorted, FID_index] = sort(cell2mat(s(:,6))); |
|
|
|
|
|
FID_index = FID_index(IS_sorted > threshold); |
|
|
|
|
|
|
|
|
|
cc = hsv(length(IS_index)); |
|
legend1 = {}; |
|
legend2 = {}; |
|
make_axis=true; |
|
for i=1:length(IS_index) |
|
legend1 = [legend1; s{IS_index(i), 1}]; |
|
figure(1) |
|
plot(s{IS_index(i),2}, s{IS_index(i),3}, 'color', cc(i,:),'linewidth',2) |
|
hold on; |
|
xlabel('itr'); ylabel('IS'); |
|
grid on; |
|
if make_axis |
|
axis([0,1e6,0,80]); |
|
end |
|
legend(legend1,'Interpreter','none') |
|
|
|
legend2 = [legend2; s{IS_index(i), 1}]; |
|
figure(2) |
|
plot(s{IS_index(i),2}, s{IS_index(i),4}, 'color', cc(i,:),'linewidth',2) |
|
hold on; |
|
xlabel('itr'); ylabel('FID'); |
|
j = j + 1; |
|
grid on; |
|
if make_axis |
|
axis([0,1e6,0,50]); |
|
end |
|
legend(legend2, 'Interpreter','none') |
|
|
|
end |
|
|
|
|
|
if 0 |
|
figure(3); |
|
this_index=4; |
|
subplot(2,1,1); |
|
|
|
|
|
plot(s{this_index, 2}, s{this_index, 7}, 'r*'); |
|
xlabel('Iteration');ylabel('T') |
|
subplot(2,1,2); |
|
plot(s{this_index, 2}, s{this_index, 3}, 'r', 'linewidth',2); |
|
xlabel('Iteration'), ylabel('Inception score') |
|
title(s{this_index,1}) |
|
end |
|
|