txizzle / drl

Deep RL Algorithms implemented for UC Berkeley's CS 294-112: Deep Reinforcement Learning
140 stars 44 forks source link

Why the reshape and flatten in hw1? #1

Closed alok closed 7 years ago

alok commented 7 years ago

I noticed that you have the lines:

X_train = X_train.reshape(X_train.shape[0], obs_data.shape[1], 1)
...

model.add(Dense(128, activation='relu', input_shape=(obs_data.shape[1], 1)))
model.add(Flatten())

Why do you make the array 3D only to almost immediately flatten it? I'm not really seeing the motivation.

txizzle commented 7 years ago

Good catch, it doesn't do anything as is. I think it's a relic from when I was playing around with different architectures / input formats. Thanks!