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

When training the network, there is a strange error. #254

Open
GuangwuOfLongCity opened this issue Apr 10, 2023 · 0 comments
Open

When training the network, there is a strange error. #254

GuangwuOfLongCity opened this issue Apr 10, 2023 · 0 comments

Comments

@GuangwuOfLongCity
Copy link

When I run python train.py, there is a strange error.

Epoch 0: StepDecay set learning rate to 0.05000000074505806.
Traceback (most recent call last):
  File "train.py", line 212, in <module>
    train()
  File "train.py", line 145, in train
    for step, (lr_patch, hr_patch) in enumerate(train_ds):
  File "C:\ProgramData\Anaconda3\envs\SRGAN\lib\site-packages\tensorlayerx\dataflow\utils.py", line 417, in __next__
    data = self._next_data()
  File "C:\ProgramData\Anaconda3\envs\SRGAN\lib\site-packages\tensorlayerx\dataflow\utils.py", line 438, in _next_data
    data = self._dataset_fetcher.fetch(index)
  File "C:\ProgramData\Anaconda3\envs\SRGAN\lib\site-packages\tensorlayerx\dataflow\utils.py", line 347, in fetch
    data = [self.dataset[id] for id in batch_indices]
  File "C:\ProgramData\Anaconda3\envs\SRGAN\lib\site-packages\tensorlayerx\dataflow\utils.py", line 347, in <listcomp>
    data = [self.dataset[id] for id in batch_indices]
  File "train.py", line 48, in __getitem__
    hr_patch = self.hr_trans(img)
  File "C:\ProgramData\Anaconda3\envs\SRGAN\lib\site-packages\tensorlayerx\vision\transforms\transforms.py", line 154, in __call__
    data = t(data)
  File "C:\ProgramData\Anaconda3\envs\SRGAN\lib\site-packages\tensorlayerx\vision\transforms\transforms.py", line 850, in __call__
    return random_crop(
  File "C:\ProgramData\Anaconda3\envs\SRGAN\lib\site-packages\tensorlayerx\vision\transforms\functional.py", line 760, in random_crop
    offset_height = np.random.randint(0, h - target_height)
  File "mtrand.pyx", line 746, in numpy.random.mtrand.RandomState.randint
  File "_bounded_integers.pyx", line 1338, in numpy.random._bounded_integers._rand_int32
ValueError: high <= 0

Could you help me?
Thanks, very much!
@zsdonghao

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

1 participant