Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set values to 0. or 1. #7

Open
flobotics opened this issue Jul 23, 2016 · 1 comment
Open

set values to 0. or 1. #7

flobotics opened this issue Jul 23, 2016 · 1 comment

Comments

@flobotics
Copy link

flobotics commented Jul 23, 2016

hi,
in line 84 you wrote as comment:

set the pixels to all be 0. or 1.

but with the following code

cv2.threshold(screen_resized_grayscaled, 1, 255, cv2.THRESH_BINARY)

you set them to 0 or 255. So the input data is not normalized, or? So , if you mostly pipe in zeros, wouldnt then the neurons not all get also zero ? x*W+b ?

https://github.com/DanielSlater/PyGamePlayer/blob/master/examples/deep_q_pong_player.py#L84

@DanielSlater
Copy link
Owner

Hi Flo, sorry yes the comment is wrong the values will be all 0. or 255. If fact I should probably change the threshold be 0. to 1. I think that may work better... I will need to investigate a little.

Sending most of the neurons input values of 0 is in itself not a problem. If that is what the input it is, that is what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants