我正在尝试通过使用权重和偏差库 (wandb)优化我的 keras 神经网络超参数。
这是我的配置:
method: bayes
metric:
goal: maximize
name: Search elo
parameters:
batch_number:
distribution: int_uniform
max: 100
min: 1
batch_size:
distribution: int_uniform
max: 1024
min: 1
epochs:
distribution: int_uniform
max: 10
min: 1
neural_net_blocks:
distribution: int_uniform
max: 5
min: 1
num_simulations:
distribution: int_uniform
max: 800
min: 1
pb_c_base:
distribution: int_uniform
max: 25000
min: 15000
pb_c_init:
distribution: uniform
max: 3
min: 1
root_dirichlet_alpha:
distribution: uniform
max: 4
min: 0
root_exploration_fraction:
distribution: uniform
max: 1
min: 0
program: ../Main.py
但是,当我运行时wandb agent arkleseisure/projectname/sweepcode
,我会收到此错误,每次扫描启动时都会重复。
2020-09-13 12:15:02,188 - wandb.wandb_agent - INFO - Running runs: ['klawqpqv']
2020-09-13 12:15:02,189 - wandb.wandb_agent - INFO - Cleaning up finished run: klawqpqv
2020-09-13 12:15:03,063 - wandb.wandb_agent - INFO - Agent received command: run
2020-09-13 12:15:03,063 - wandb.wandb_agent - INFO - Agent starting run with config:
batch_number: 75
batch_size: 380
epochs: 10
neural_net_blocks: 4
num_simulations: 301
pb_c_base: 17138
pb_c_init: 1.5509741790555416
root_dirichlet_alpha: 2.7032316257955133
root_exploration_fraction: 0.5768106739703028
2020-09-13 12:15:03,245 - wandb.wandb_agent - INFO - About to run command: python ../Main.py --batch_number=75 --batch_size=380 --epochs=10 --neural_net_blocks=4 --num_simulations=301 --p
b_c_base=17138 --pb_c_init=1.5509741790555416 --root_dirichlet_alpha=2.7032316257955133 --root_exploration_fraction=0.5768106739703028
Traceback (most recent call last):
File "../Main.py", line 3, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
三次尝试失败后扫描崩溃,我想知道我做错了什么。当然,当 W&B 用于机器学习项目时,必须可以导入 numpy,所以我可以更改什么。在那之前我的代码只是从我的项目中导入其他文件。当我正常运行代码时,它不会崩溃,而是正常执行。