Ejemplo n.º 1
0
 def check_config(config: Munch):
     assert config.miner.momentum > 0 and config.miner.momentum < 1, "momentum must be a value between 0 and 1"
     assert config.miner.learning_rate > 0, "learning rate must be be a positive value."
     full_path = '{}/{}/{}/'.format(config.miner.root_dir,
                                    config.miner.name,
                                    config.miner.trial_uid)
     config.miner.full_path = os.path.expanduser(full_path)
     if not os.path.exists(config.miner.full_path):
         os.makedirs(config.miner.full_path)
     FFNNSynapse.check_config(config)
     bittensor.neuron.Neuron.check_config(config)
Ejemplo n.º 2
0
 def check_config(config: Munch):
     assert config.session.log_interval > 0, "log_interval dimension must be positive"
     assert config.session.momentum > 0 and config.session.momentum < 1, "momentum must be a value between 0 and 1"
     assert config.session.batch_size_train > 0, "batch_size_train must be a positive value"
     assert config.session.batch_size_test > 0, "batch_size_test must be a positive value"
     assert config.session.learning_rate > 0, "learning rate must be be a positive value."
     full_path = '{}/{}/{}/'.format(config.session.root_dir, config.session.name, config.session.uid)
     config.session.full_path = full_path
     if not os.path.exists(config.session.full_path):
         os.makedirs(config.session.full_path)
     FFNNSynapse.check_config(config)
     Neuron.check_config(config)