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

[bug report] Images rotated by 90 degrees #41

Open
ncble opened this issue May 19, 2019 · 0 comments
Open

[bug report] Images rotated by 90 degrees #41

ncble opened this issue May 19, 2019 · 0 comments

Comments

@ncble
Copy link
Collaborator

ncble commented May 19, 2019

I have noticed that the images generated by the environment are inconsistent with the other features. In fact, due to the 'channel first' convention in Pytorch, the images should be transposed using np.transpose(0,3,1,2) instead of np.transpose(0,3,2,1); and np.transpose(2,0,1) instead of np.transpose(2,1,0). Several scripts need to be corrected: (both in the robotics-rl-srl and srl_zoo)

Scripts to be corrected:

  • ./rl_baselines/evolution_strategies/cma_es.py: np.transpose(obs / 255.0, (0, 3, 1, 2))
  • ./rl_baselines/evolution_strategies/cma_es.py: np.transpose(obs / 255.0, (0, 3, 1, 2))
  • ./state_representation/models.py: np.transpose(observation, (0, 3, 2, 1))
  • ./srl_zoo/plotting/representation_plot.py: np.transpose(image, (2, 1, 0))
  • ./srl_zoo/preprocessing/utils.py: np.transpose(x, (2, 1, 0))
  • ./srl_zoo/preprocessing/data_loader.py: im = th.tensor(im.reshape((1,) + im.shape).transpose(0, 3, 2, 1))
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

Successfully merging a pull request may close this issue.

1 participant