Compare commits

..

9 Commits
matrix ... main

Author SHA1 Message Date
Malte Grosse 4323d3ebf3 try
ci/woodpecker/push/woodpecker Pipeline was successful Details
2024-10-07 11:37:59 +02:00
Malte Grosse ef9e32ae72 testlere 2024-09-25 11:05:33 +02:00
Malte Grosse 3d33eae029 test
ci/woodpecker/push/woodpecker Pipeline was successful Details
2024-06-24 14:20:44 +02:00
Malte Grosse ce15825a91 test
ci/woodpecker/push/woodpecker Pipeline was successful Details
2024-06-24 08:59:56 +02:00
Cornelius Specht 5475e022df changed to orignial tf model
ci/woodpecker/push/woodpecker Pipeline was successful Details
2024-06-20 10:18:04 +02:00
Cornelius Specht aac0ddad01 add readme
ci/woodpecker/push/woodpecker Pipeline was successful Details
2024-06-14 13:06:47 +02:00
Malte Grosse f707547267 3rd
ci/woodpecker/push/woodpecker Pipeline was successful Details
2023-11-30 20:37:15 +09:00
Malte Grosse 49fbd0c8c2 exec
ci/woodpecker/push/woodpecker Pipeline is pending Details
2023-11-30 20:22:14 +09:00
Malte Grosse b4dcf6632a v2 example
ci/woodpecker/push/woodpecker Pipeline was successful Details
2023-11-29 08:48:56 +09:00
3 changed files with 9 additions and 17 deletions

View File

@ -1,17 +1,9 @@
matrix:
EPOCHS:
- 20
- 30
OPTIMIZER:
- adam
- SGD
steps: steps:
"train": "train":
image: nvcr.io/nvidia/tensorflow:23.10-tf2-py3 image: nvcr.io/nvidia/tensorflow:23.10-tf2-py3
commands: commands:
- echo "starting python script" - echo "starting python scrip sd "
- python run.py - python run.py
"compress and upload": "compress and upload":
image: alpine:3 image: alpine:3
commands: commands:

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# Long Running Trainings
This repository contains an example pipeline for long running training tasks.
Detailed information can be found at the official [Sandbox Documentation](https://docs.sandbox.iuk.hdm-stuttgart.de/sandbox/training.html).

10
run.py
View File

@ -8,10 +8,6 @@ import os
from keras import backend as K from keras import backend as K
K.clear_session() K.clear_session()
EPOCHS = int(os.getenv("EPOCHS", default = 10))
OPTIMIZER = os.getenv("OPTIMIZER", default = "SGD")
gpus = tf.config.experimental.list_physical_devices('GPU') gpus = tf.config.experimental.list_physical_devices('GPU')
# if gpus: # if gpus:
# try: # try:
@ -21,7 +17,7 @@ gpus = tf.config.experimental.list_physical_devices('GPU')
# os.exit(1) # os.exit(1)
print(tf.config.experimental.list_physical_devices()) print(tf.config.experimental.list_physical_devices())
print("test")
print(tf.__version__) print(tf.__version__)
print(tf.test.is_built_with_cuda()) print(tf.test.is_built_with_cuda())
@ -72,10 +68,10 @@ with tf.device('/GPU:0'):
keras.layers.Dense(10, activation='sigmoid') keras.layers.Dense(10, activation='sigmoid')
]) ])
# g # g
model.compile(optimizer=OPTIMIZER, model.compile(optimizer='SGD',
loss='categorical_crossentropy', loss='categorical_crossentropy',
metrics=['accuracy']) metrics=['accuracy'])
model.fit(X_train_scaled, y_train_categorical, epochs=EPOCHS) model.fit(X_train_scaled, y_train_categorical, epochs=25)
model.save('mymodel.keras') model.save('mymodel.keras')
print("finished training") print("finished training")