forked from YotYot/StereoNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscratch.py
More file actions
25 lines (21 loc) · 871 Bytes
/
Copy pathscratch.py
File metadata and controls
25 lines (21 loc) · 871 Bytes
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
from dfd import Dfd_net
import torch
import matplotlib.pyplot as plt
import numpy as np
import os
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
clean_log = '/media/yotamg/bd0eccc9-4cd5-414c-b764-c5a7890f9785/Yotam/Tau-agent/Right_images/clean_losses.log'
filtered_log = '/media/yotamg/bd0eccc9-4cd5-414c-b764-c5a7890f9785/Yotam/Tau-agent/Right_images/filtered_losses.log'
confs_log = '/home/yotamg/PycharmProjects/PSMNet/run_confs_to_100.log'
with open(confs_log, 'rb') as f:
confs = f.readlines()
# with open(filtered_log, 'rb') as f:
# filtered = f.readlines()
clean_losses = [float(line.split(" ")[-1]) for line in clean]
filtered_losses =[float(line.split(" ")[-1]) for line in filtered]
plt.plot(clean_losses, label="Clean")
plt.plot(filtered_losses, label="Filtered")
plt.legend()
# plt.yscale('log')
plt.show()
print( "DONE")