• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
yjyoon / Raindrop_Detection star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
Raindrop_Detectiontoolslogger.py
Download as .zip file
File name
Commit message
Commit date
data
updating loss function
2023-06-23
model
Its running!
2023-07-03
tools
Its running!
2023-07-03
.gitignore
finished training code for generator, now the rest is discriminator.
2023-06-30
README.md
readme update
2023-06-21
batchmix.png
theorizing train code for GAN
2023-06-22
datasetmananger.py
theorizing about dataset management
2023-06-23
main.py
Hello YONA
2023-06-21
train.py
Its running!
2023-07-03
File name
Commit message
Commit date
argparser.py
finished training code for generator, now the rest is discriminator.
2023-06-30
dataloader.py
finished training code for generator, now the rest is discriminator.
2023-06-30
logger.py
Its running!
2023-07-03
juni 2023-07-03 2fbce64 Its running! UNIX
Raw Open in browser Change history
import sys import time import plotly.express as px import dash from dash import dcc from dash import html from dash.dependencies import Input, Output class Logger(): def __init__(self): self.start_time = time.time() self.epoch_start_time = self.start_time self.losses = [] self.app = dash.Dash(__name__) self.app.layout = html.Div([ dcc.Graph(id='live-update-graph'), dcc.Interval( id='interval-component', interval=1 * 1000, # in milliseconds n_intervals=0 ) ]) @self.app.callback(Output('live-update-graph', 'figure'), [Input('interval-component', 'n_intervals')]) def update_graph_live(n): # Create the graph with subplots fig = px.line(x=list(range(len(self.losses))), y=self.losses, labels={'x': 'Epoch', 'y': 'Loss'}) return fig def print_training_log(self, current_epoch, total_epoch, current_batch, total_batch, losses): assert type(losses) == dict current_time = time.time() epoch_time = current_time - self.epoch_start_time total_time = current_time - self.start_time estimated_total_time = total_time * total_epoch / (current_epoch + 1) remaining_time = estimated_total_time - total_time self.epoch_start_time = current_time terminal_logging_string = "" for loss_name, loss_value in losses.items(): terminal_logging_string += f"{loss_name} : {loss_value}\n" if loss_name == 'loss': self.losses.append(loss_value) sys.stdout.write( f"epoch : {current_epoch}/{total_epoch}\n" f"batch : {current_batch}/{total_batch}\n" f"estimated time remaining : {remaining_time}" f"{terminal_logging_string}" ) def print_training_history(self): self.app.run_server(debug=True)

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up