🐛 Fixes analyze.sh script
This commit is contained in:
parent
ee66b08778
commit
929ba716a0
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
find results ! -name 'train.txt' -type f -exec rm -f {} +
|
rm results/*
|
||||||
|
|
||||||
./venv/bin/python3 distribution.py --graph --save | tee results/distribution.txt
|
./venv/bin/python3 distribution.py --graph --save | tee results/distribution.txt
|
||||||
echo -e "\n\n\n\n"
|
echo -e "\n\n\n\n"
|
||||||
@ -17,3 +17,9 @@ echo -e "\n\n\n\n"
|
|||||||
./venv/bin/python3 analyze_sleep.py --graph --save "results/Figure_18.png" | tee results/sleep.txt
|
./venv/bin/python3 analyze_sleep.py --graph --save "results/Figure_18.png" | tee results/sleep.txt
|
||||||
echo -e "\n\n\n\n"
|
echo -e "\n\n\n\n"
|
||||||
./venv/bin/python3 analyze_absence.py --graph --save "results/Figure_19.png" | tee results/absence.txt
|
./venv/bin/python3 analyze_absence.py --graph --save "results/Figure_19.png" | tee results/absence.txt
|
||||||
|
echo -e "\n\n\n\n"
|
||||||
|
./venv/bin/python3 train_nn.py --graph --save "results/Figure_20.png" | tee results/train.txt
|
||||||
|
echo -e "\n\n\n\n"
|
||||||
|
|
||||||
|
tar cvzf results.tar.gz results/
|
||||||
|
zip results.zip results/*
|
||||||
|
BIN
results.tar.gz
BIN
results.tar.gz
Binary file not shown.
BIN
results.zip
BIN
results.zip
Binary file not shown.
@ -11,8 +11,10 @@ parser = argparse.ArgumentParser(
|
|||||||
prog="train_nn"
|
prog="train_nn"
|
||||||
)
|
)
|
||||||
parser.add_argument("-g", "--graph", action="store_true", default=False, help="Graph losses")
|
parser.add_argument("-g", "--graph", action="store_true", default=False, help="Graph losses")
|
||||||
|
parser.add_argument("-s", "--save", default="", help="Graph save location")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
graph = args.graph
|
graph = args.graph
|
||||||
|
save = args.save
|
||||||
|
|
||||||
|
|
||||||
class NeuralNetwork(nn.Module):
|
class NeuralNetwork(nn.Module):
|
||||||
@ -179,4 +181,7 @@ if graph:
|
|||||||
|
|
||||||
plt.legend()
|
plt.legend()
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
plt.show()
|
if save != "":
|
||||||
|
plt.savefig(save)
|
||||||
|
else:
|
||||||
|
plt.show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user