Skip to content

Instantly share code, notes, and snippets.

@siakon89
Created June 18, 2018 15:24
Show Gist options
  • Save siakon89/5e9c4f71de0a2a9bc524e559e73add94 to your computer and use it in GitHub Desktop.
Save siakon89/5e9c4f71de0a2a9bc524e559e73add94 to your computer and use it in GitHub Desktop.
with open(param_path, 'r') as params:
hyperParams = json.load(params)
print("Hyper parameters: " + str(hyperParams))
lr = float(hyperParams.get('lr', '0.001'))
batch_size = int(hyperParams.get('batch_size', '64'))
epochs = int(hyperParams.get('epochs', '100'))
gpu_count = int(hyperParams.get('gpu_count', '1'))
num_classes = 10
# Read input data config passed by SageMaker
with open(data_path, 'r') as params:
inputParams = json.load(params)
print("Input parameters: " + str(inputParams))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment