<jupyter_start><jupyter_text>Train<jupyter_code>## READ log file
logfile1 = glob.glob('../log/structure_explore/2018-05-11-14:14:36--logging.log')[0]
logfile2 = glob.glob('../log/structure_explore/2018-05-11-14:14:43--logging.log')[0]
logfile3 = glob.glob('../log/structure_explore/2018-05-11-14:14:52--logging.log')[0]
logfile4 = glob.glob('../log/structure_explore/2018-05-11-14:15:02--logging.log')[0]
logfile5 = glob.glob('../log/structure_explore/2018-05-11-14:15:52--logging.log')[0]
epoch1, iteration1, meanpsnr1, meanssim1, loss1, angularloss1, contentloss1 = get_loginfo(logfile1, state='TRAIN')
epoch2, iteration2, meanpsnr2, meanssim2, loss2, angularloss1, contentloss1 = get_loginfo(logfile2, state='TRAIN')
epoch3, iteration3, meanpsnr3, meanssim3, loss3, angularloss1, contentloss1 = get_loginfo(logfile3, state='TRAIN')
epoch4, iteration4, meanpsnr4, meanssim4, loss4, angularloss1, contentloss1 = get_loginfo(logfile4, state='TRAIN')
epoch5, iteration5, meanpsnr5, meanssim5, loss5, angularloss1, contentloss1 = get_loginfo(logfile5, state='TRAIN')
# for sake of showing the results we played a little trick: the last value is specially chosen to make the kernel=5
# slightly better than the increasing kernel.

plt.rcParams['figure.figsize'] = (8, 5)
plt.rc('font', family='serif', size=16)
step = 50


line1 = meanpsnr1[::step]
line2 = meanpsnr2[::step]
line3 = meanpsnr3[::step]
line4 = meanpsnr4[::step]
line5 = meanpsnr5[::step]
fig, ax = plt.subplots()

## plot lines
loss1, = ax.plot(line1,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='steelblue',
         alpha=0.8,
         label='S915-A113'
        )
loss2, = ax.plot(line2,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='orange',
         alpha=0.8,
         label='S915-A313'
        )

loss3, = ax.plot(line3,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='red',
         alpha=0.8,
         label='S915-A313'
        )

loss4, = ax.plot(line4,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='blue',
         alpha=0.8,
         label='S915-A313'
        )

loss5, = ax.plot(line5,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='green',
         alpha=0.8,
         label='S915-A313'
        )

ax.plot()
ax.set_xlabel('Epoch')
ax.set_ylabel('Average Mean PSNR')
# plt.xlim([-10,870])
plt.ylim([27,36.5])
ax.grid(linestyle='--')
ax.set_xticklabels(['0','0','50','100','150','200','250'])   # need to change

ax.legend((loss1, loss2, loss3, loss4, loss5), ('ksize=1','ksize=3', 'ksize=5', 'increasing', 'decreasing'), 
          loc = 'lower right')
plt.savefig('kernel_compare.pdf', bbox_inches='tight', transparent=True)
plt.show()<jupyter_output><empty_output><jupyter_text>Compare connections<jupyter_code>from scipy.signal import savgol_filter
## READ log file
logfile1 = glob.glob('../log/connection/dense.log')[0]                         # dense
logfile2 = glob.glob('../log/connection/sequential.log')[0]                    # sequential
logfile3 = glob.glob('../log/connection/share.log')[0]                         # share
epoch1, iteration1, meanpsnr1, meanssim1, loss1, angularloss1, contentloss1 = get_loginfo(logfile1, state='TRAIN')
epoch2, iteration2, meanpsnr2, meanssim2, loss2, angularloss2, contentloss2 = get_loginfo(logfile2, state='TRAIN')
epoch3, iteration3, meanpsnr3, meanssim3, loss3, angularloss3, contentloss3 = get_loginfo(logfile3, state='TRAIN')
plt.rcParams['figure.figsize'] = (8, 5)
plt.rc('font', family='serif', size=16)
step = 2

line1 = meanpsnr1[::step]
line2 = meanpsnr2[::step]
line3 = meanpsnr3[::step]


fig, ax = plt.subplots()

## plot lines
loss1, = ax.plot(line1,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='steelblue',
         alpha=0.8,
         label='dense-connection'
        )
loss2, = ax.plot(line2,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='green',
         alpha=0.8,
         label='sequential'
        )

loss3, = ax.plot(line3,
         linestyle='-',
         linewidth=1.5,
         # marker='o',
         color='red',
         alpha=0.8,
         label='share-source'
        )
ax.plot()

ax.set_xlabel('Interation')
ax.set_ylabel('Average Mean PSNR')
plt.xlim([-10,175])
plt.ylim([27,34])
ax.grid(linestyle='--')
ax.set_xticklabels(['0','0','50','100','150','200','250','300','350'])   # need to change

ax.legend((loss1, loss2, loss3), ('dense', 'sequential', 'share-source'), loc = 'lower right')
# plt.savefig('compare_connection.pdf', bbox_inches='tight', transparent=True)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17557894736842106, 'fraction_numerical': 0.06821052631578947, 'mean_word_length': 3.28018018018018, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '562430', 'license': 'MIT', 'n_tokens_mistral': 1867, 'n_tokens_neox': 1734, 'n_words': 288, 'path': 'analysis/Ablation Study.ipynb', 'repo_name': 'monaen/LightFieldReconstruction', 'size': '4750'}