Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a short script to use Monte Carlo method to estimate | |
# the win rate of different strategies taken in the famous Monty Hall Problem - | |
# Because my wife had a hard time understanding the rationale behind it ;) | |
import random | |
rounds = 1_000_000 | |
def main(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# train-test partition | |
python3 ../../scripts/preprocessing/partition_dataset.py -i images -o images -x | |
# compile TFRecords - Train | |
python3 ../../scripts/preprocessing/generate_tfrecord.py --xml_dir=images/train --labels_path=annotations/label_map.pbtxt --output_path=annotations/train.record --csv_path=annotations/train.csv | |
# compile TFRecords - Test | |
python3 ../../scripts/preprocessing/generate_tfrecord.py --xml_dir=images/test --labels_path=annotations/label_map.pbtxt --output_path=annotations/test.record --csv_path=annotations/test.csv | |
# actual training |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import tensorflow as tf | |
from tensorflow import keras | |
from tensorflow.keras import layers | |
import numpy as np | |
import ray | |
from ray import tune | |
from ray.util.sgd.tf.tf_trainer import TFTrainer, TFTrainable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST http://localhost:5555/api/experimental/dags/{your-dag-name-here}/dag_runs -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"conf": ""}' |
NewerOlder