小编Sha*_*hta的帖子

ValueError:给定的 numpy 数组中至少有一个步幅为负,并且当前不支持具有负步幅的张量

我正在使用 RL 编写自动驾驶代码。我正在使用稳定的基线3和开放的人工智能健身房环境。我在 jupyter 笔记本中运行以下代码,但出现以下错误:

# Testing our model
episodes = 5 # test the environment 5 times
for episodes in range(1,episodes+1): # looping through each episodes
    bs = env.reset() # observation space
    # Taking the obs and passing it through our model
    # tells that which kind of the action is best for our work
    done = False 
    score = 0
    while not done:
        env.render()
        action, _ = model.predict(obs) # now using model here # returns model action and …
Run Code Online (Sandbox Code Playgroud)

python reinforcement-learning openai-gym stable-baselines

3
推荐指数
1
解决办法
7410
查看次数