mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-13 22:56:18 +00:00
visualization v 1.0.0.000, titanlearn v 2.0.1.001
This commit is contained in:
parent
8dd2440f08
commit
1d4b2bd49d
@ -7,10 +7,13 @@
|
|||||||
# this module learns from its mistakes far faster than 2022's captains
|
# this module learns from its mistakes far faster than 2022's captains
|
||||||
# setup:
|
# setup:
|
||||||
|
|
||||||
__version__ = "2.0.1.000"
|
__version__ = "2.0.1.001"
|
||||||
|
|
||||||
#changelog should be viewed using print(analysis.__changelog__)
|
#changelog should be viewed using print(analysis.__changelog__)
|
||||||
__changelog__ = """changelog:
|
__changelog__ = """changelog:
|
||||||
|
2.0.1.001:
|
||||||
|
- removed matplotlib import
|
||||||
|
- removed graphloss()
|
||||||
2.0.1.000:
|
2.0.1.000:
|
||||||
- added net, dataset, dataloader, and stdtrain template definitions
|
- added net, dataset, dataloader, and stdtrain template definitions
|
||||||
- added graphloss function
|
- added graphloss function
|
||||||
@ -36,7 +39,6 @@ __all__ = [
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
from os import system, name
|
from os import system, name
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
def clear():
|
def clear():
|
||||||
@ -114,9 +116,3 @@ def stdtrainer(net, criterion, optimizer, dataloader, epochs, batch_size):
|
|||||||
trainloader = dataloader
|
trainloader = dataloader
|
||||||
|
|
||||||
return train(device, net, epochs, trainloader, optimizer, criterion)
|
return train(device, net, epochs, trainloader, optimizer, criterion)
|
||||||
|
|
||||||
def graphloss(losses):
|
|
||||||
|
|
||||||
x = range(0, len(losses))
|
|
||||||
plt.plot(x, losses)
|
|
||||||
plt.show()
|
|
34
data analysis/analysis/visualization.py
Normal file
34
data analysis/analysis/visualization.py
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Titan Robotics Team 2022: Visualization Module
|
||||||
|
# Written by Arthur Lu & Jacob Levine
|
||||||
|
# Notes:
|
||||||
|
# this should be imported as a python module using 'import visualization'
|
||||||
|
# this should be included in the local directory or environment variable
|
||||||
|
# fancy
|
||||||
|
# setup:
|
||||||
|
|
||||||
|
__version__ = "1.0.0.000"
|
||||||
|
|
||||||
|
#changelog should be viewed using print(analysis.__changelog__)
|
||||||
|
__changelog__ = """changelog:
|
||||||
|
1.0.0.000:
|
||||||
|
- created visualization.py
|
||||||
|
- added graphloss()
|
||||||
|
- added imports
|
||||||
|
"""
|
||||||
|
|
||||||
|
__author__ = (
|
||||||
|
"Arthur Lu <arthurlu@ttic.edu>,"
|
||||||
|
"Jacob Levine <jlevine@ttic.edu>,"
|
||||||
|
)
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
'graphloss',
|
||||||
|
]
|
||||||
|
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
def graphloss(losses):
|
||||||
|
|
||||||
|
x = range(0, len(losses))
|
||||||
|
plt.plot(x, losses)
|
||||||
|
plt.show()
|
Loading…
Reference in New Issue
Block a user