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

I cannot get this to run. #17

Open
paarthtandon opened this issue Mar 27, 2021 · 2 comments
Open

I cannot get this to run. #17

paarthtandon opened this issue Mar 27, 2021 · 2 comments

Comments

@paarthtandon
Copy link

paarthtandon commented Mar 27, 2021

I'm doing some research in continual learning, and a HyperNEAT implementation would come in handy. I have tried many things, and for the life of me I cannot get this implementation to run.

When I use a modern version of torch, I get IndexError: tensors used as indices must be long, byte or bool tensors after running the simple example.

I'm not sure if I can install pytorch 0.4.0, and even if I did I don't think this version supports CUDA.

Does anyone know if there is a way I can use this implementation, otherwise are there any other implementations of HyperNEAT I can use out there?

@marctheshark3
Copy link

You just need to change the types for the environment as it is expecting you to use one of the dtypes it mentions in the index error.

I solved this by modifying the recurrent_net.py, dense_from_coo method in line 37 to this:

mat[torch.tensor(rows, dtype=torch.long), torch.tensor(cols, dtype=torch.long)] = [right hand side stays the same] 

I did notice in there is an argument in each of the main.py files in the examples to put in the type (in the decorator). Right now it is set to an integer but might make sense to change it to float there, so as to not do the code modification I mentioned above. I havnt tested this yet though.

@marctheshark3
Copy link

#2 (comment)

This is the same error also and was solved in a similar manner.

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