Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

fix bug in smartparam example #322

Merged
merged 1 commit into from
Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/trials/mnist-smartparam/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def generate_defualt_params():

if __name__ == '__main__':
try:
nni.get_next_parameter()
main(generate_defualt_params())
except Exception as exception:
logger.exception(exception)
Expand Down
1 change: 1 addition & 0 deletions src/sdk/pynni/nni/trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_next_parameter():
return _params['parameters']

def get_current_parameter(tag):
global _params
if _params is None:
return None
return _params['parameters'][tag]
Expand Down