You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@GeorgeFrangulea I solved this problem. It seems that the connection between ns3 and gym have some problems, so it went wrong. The state in code turned to be None, which cause this problem. I solved it by set when "state = None" then jump out of the loop and continue the loop. The result is correct.
As I konw, you should use env = ns3env.Ns3Env() to create the environment.
Traceback (most recent call last):
File "./cognitive-agent-v1.py", line 66, in
next_state = np.reshape(next_state, (1, s_size))
File "<array_function internals>", line 5, in reshape
File "/home/xujunwei/anaconda3/envs/tensorflow/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 298, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/xujunwei/anaconda3/envs/tensorflow/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 1 into shape (1,4)
It seems that the return of the function env.reset() is not an array, so the reshape function could not work.
The text was updated successfully, but these errors were encountered: