rlcode / reinforcement-learning-kr-v2

[파이썬과 케라스로 배우는 강화학습] 텐서플로우 2.0 개정판 예제
MIT License
128 stars 100 forks source link

Dense Layer with non floating point datatype #24

Closed Safiullahmarwat closed 3 years ago

Safiullahmarwat commented 3 years ago

Hi there, While executing the code "6-reinforce", i am getting this error "TypeError: Unable to build Dense layer with non-floating point dtype <dtype: 'int32'>" thrown by the line "policy = self.model(state)[0]". when i type casted the integer input "state" to float as "state.astype('float')" now it generate the error "len() of unsized object" at line "return np.random.choice(self.action_size, 1, p=policy)[0]" . how to tackle this?

Safiullahmarwat commented 3 years ago

okay, its no more an issue, it was libraries version mismatch.