Exemplo n.º 1
0
        help="Specifies Determined Experiment configuration.",
        default="{}",
    )
    parser.add_argument("--mode",
                        dest="mode",
                        help="Specifies local mode or cluster mode.",
                        default="cluster")
    args = parser.parse_args()

    config = {
        "data": {
            "url":
            "https://s3-us-west-2.amazonaws.com/determined-ai-test-data/pytorch_mnist.tar.gz"
        },
        "hyperparameters": {
            "learning_rate": det.Log(minval=-3.0, maxval=-1.0, base=10),
            "dropout": det.Double(minval=0.2, maxval=0.8),
            "global_batch_size": det.Constant(value=64),
            "n_filters1": det.Constant(value=32),
            "n_filters2": det.Constant(value=32),
        },
        "searcher": {
            "name": "single",
            "metric": "validation_error",
            "max_steps": 20,
            "smaller_is_better": True,
        },
    }
    config.update(json.loads(args.config))

    experimental.create(
Exemplo n.º 2
0
if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--config",
        dest="config",
        help="Specifies Determined Experiment configuration.",
        default="{}",
    )
    parser.add_argument(
        "--mode", dest="mode", help="Specifies local mode or cluster mode.", default="cluster"
    )
    args = parser.parse_args()

    config = {
        "hyperparameters": {
            "learning_rate": det.Log(-4.0, -2.0, 10),
            "global_batch_size": det.Constant(64),
            "hidden_layer_1": det.Constant(250),
            "hidden_layer_2": det.Constant(250),
            "hidden_layer_3": det.Constant(250),
            "dropout": det.Double(0.0, 0.5),
        },
        "searcher": {
            "name": "single",
            "metric": "accuracy",
            "max_steps": 10,
            "smaller_is_better": False,
        },
    }
    config.update(json.loads(args.config))