-
Notifications
You must be signed in to change notification settings - Fork 723
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
[question] Why can't I build a cnn policy behaving like a mlp policy ? #456
Comments
Hello, I think this issue is related to your problem (1D Convolution): #436
When using a CNN policy, you have to make sure the input is an image and has values in [0, 255] (cf doc). |
Hi @araffin and thanks for your answer, |
The information is here
If you normalize the input, you have to deactivate the normalization using
Values will be cast to float anyway |
So do you mean it is enough to just provide the float input data, and put |
@araffin will a |
As fully convolutional networks are useful for many more applications than image analysis, it would be great to have a flag to disable this renormalization in an easy way for the user. Could this be done @araffin ? :) |
That depends on what you mean by "it works". Will you avoid to do a second normalization? yes. Will it succeed to solve the task? maybe not (you may need hyperparameter tuning). Also, CNN assumes some locality property on your input data (like images).
It seems you need to either write a custom
fully convolutional networks for RL? you mean convolution? The flag is set automatically because the
|
Thank you, creating a custom FeedForwardPolicy class to set |
Hi, I hope this is the right place for this question.
I'm creating a custom policy for a project and for multiple reasons I wanted to build a convolutional neural network that's on paper the same as a mlp with three hidden layers [128, 64, 64].
My mlp policy is working fine, but I can't reproduce these results with a cnn policy, even though I've dug into the functions I use and it should work like a mlp.
Here is my custom cnn policy :
(
n_arrays
is 1 for now, this parameter is here because the reason I wanted to build a cnn extractor was to mimic multiple mlp extractors when my obs space was multiple arrays)So basically each time I'm doing a convolution, it is on an image of shape (1, width), and I'm doing it with a kernel of shape (1, width), with n filters, which should be equivalent to a fully connected layer of size n.
However I get terrible results with such a policy compared to the mlp one.
What have I got wrong ? I'm positive I haven't made a stupid mistake about the shape of my arrays, so why are those two implementions so different during training ?
The text was updated successfully, but these errors were encountered: