MatthewJA / Inverse-Reinforcement-Learning

Implementations of selected inverse reinforcement learning algorithms.
MIT License
971 stars 236 forks source link

Theano package error #11

Open Sankalp1233 opened 3 years ago

Sankalp1233 commented 3 years ago

I am currently running code and am getting an error: I reshaped the feature matrix as reshaped_to_2d_reshape as (num_of_states, num_of_dimensions) and am still getting this error. I am not sure how to debug it. Traceback (most recent call last): File "ID_grouping.py", line 409, in learning_rate,initialisation="normal",l1=0.1,l2=0.1)) File "ID_grouping.py", line 398, in irl reward = train(reshaped_to_2d_reshape[0]) File "C:\Users\Sankalp Chauhan\AppData\Local\Programs\Python\Python37\lib\site-packages\theano\compile\function_module.py", line 813, in call allow_downcast=s.allow_downcast) File "C:\Users\Sankalp Chauhan\AppData\Local\Programs\Python\Python37\lib\site-packages\theano\tensor\type.py", line 178, in filter data.shape)) TypeError: Bad input argument to theano function with name "ID_grouping.py:388" at index 0 (0-based). Backtrace when that variable is created:

File "ID_grouping.py", line 409, in learning_rate,initialisation="normal",l1=0.1,l2=0.1)) File "ID_grouping.py", line 316, in irl s_feature_matrix = T.matrix("x") Wrong number of dimensions: expected 2, got 1 with shape (5,). What version of theano and theano.tensor you use in your code? This occurs with deep_maxent.py