kentsommer / pytorch-value-iteration-networks

Pytorch implementation of Value Iteration Networks (NIPS 2016 best paper)
BSD 3-Clause "New" or "Revised" License
318 stars 62 forks source link

Problem of running dataset/make_training_data.py script #14

Open ruqing00 opened 1 year ago

ruqing00 commented 1 year ago

Hi

When I tried to run the make_training_data.py script to generate the gridworld.npz file, I got the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'dataset/gridworld_28x28.npz'

And I found that line 101 should be modified as follows:

save_path = "gridworld_{0}x{1}".format(dom_size[0], dom_size[1])
JYTCV commented 1 year ago

Have you implemented the program of Mars data experiment? Can you share how to generate a Mars data set?

LTH40025 commented 9 months ago

hi ,i faced this problem , can you show your floder for me? Traceback (most recent call last): File ".\make_training_data.py", line 9, in <module> from domains.gridworld import * ModuleNotFoundError: No module named 'domains'

ruqing00 commented 9 months ago

hi ,i faced this problem , can you show your floder for me? Traceback (most recent call last): File ".\make_training_data.py", line 9, in <module> from domains.gridworld import * ModuleNotFoundError: No module named 'domains'

Surely, I run this project in Pycharm with Windows, and here is my floder structure: E:\PROJECT\PYTHON_PROJECT\VALUE_ITERATION_NETWORKS\KENTSOMMER_PYTORCH │ download_weights_and_datasets.sh │ LICENSE │ model.py │ README.md │ requirements.txt │ test.py │ train.py │ ├─.idea │ │ .gitignore │ │ encodings.xml │ │ kentsommer_pytorch.iml │ │ misc.xml │ │ modules.xml │ │ other.xml │ │ vcs.xml │ │ workspace.xml │ │ │ └─inspectionProfiles │ profiles_settings.xml │ Project_Default.xml │ ├─dataset │ │ dataset.py │ │ gridworld_16x16.npz │ │ gridworld_28x28.npz │ │ gridworld_8x8.npz │ │ make_training_data.py │ │ README.MD │ │ init.py │ │ │ └─pycache │ dataset.cpython-37.pyc │ init.cpython-37.pyc │ ├─domains │ │ gridworld.py │ │ init.py │ │ │ └─pycache │ gridworld.cpython-37.pyc │ init.cpython-37.pyc │ ├─generators │ │ obstacle_gen.py │ │ init.py │ │ │ └─pycache │ obstacle_gen.cpython-37.pyc │ init.cpython-37.pyc │ ├─results │ 16x16_1.png │ 16x16_2.png │ 28x28_1.png │ 28x28_2.png │ 8x8_1.png │ 8x8_2.png │ ├─trained │ README.md │ vin_8x8.pth │ ├─utility │ │ utils.py │ │ init.py │ │ │ └─pycache │ utils.cpython-37.pyc │ init.cpython-37.pyc │ └─pycache model.cpython-37.pyc

LTH40025 commented 9 months ago

Hi

When I tried to run the make_training_data.py script to generate the gridworld.npz file, I got the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'dataset/gridworld_28x28.npz'

And I found that line 101 should be modified as follows:

save_path = "gridworld_{0}x{1}".format(dom_size[0], dom_size[1])

I think your problem is your save_path error save_path = "C:\\Users\\Desktop\\dataset\\gridworld_{0}x{1}".format(dom_size[0], dom_size[1])

ruqing00 commented 9 months ago

Hi When I tried to run the make_training_data.py script to generate the gridworld.npz file, I got the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'dataset/gridworld_28x28.npz'

And I found that line 101 should be modified as follows:

save_path = "gridworld_{0}x{1}".format(dom_size[0], dom_size[1])

I think your problem is your save_path error save_path = "C:\\Users\\Desktop\\dataset\\gridworld_{0}x{1}".format(dom_size[0], dom_size[1])

Thank you very much for suggesting a solution, I have successfully solved the problem! modify line 101 can also solve the problem:

save_path = "gridworld_{0}x{1}".format(dom_size[0], dom_size[1])