dani_kal:

Actually they are integers


The problem is that action_size is actually not an integer. You even printed it’s type here:



 dani_kal:

print(type(action_size))


getting this result:



 dani_kal:

<class ‘list’>


If you want to use the + operator on a list and an integer you can either add the number into the List as Dishin_Goyani explained.



 Dishin_Goyani:

If i understand correctly; you want to add number into the List than it would be
self.fc2 = nn.Linear([fc1_units] + action_size, fc2_units)



Or take one item from the List (assuming there are integers in your list) and add it together with your fc1_units. Like:
self.fc2 = nn.Linear(fc1_units + action_size[0], fc2_units)