Git Product home page Git Product logo

restoregan's People

Contributors

arsenyinfo avatar kupynorest avatar t-martyniuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

restoregan's Issues

ValueError: operands could not be broadcast together with shapes (256,256,4) (3,) (256,256,4)

If you use your own data set, you will get this error.
Please tell us what to do.

Epoch 0, lr 0.0001: 0%| | 0/1000 [00:00<?, ?it/s]W1119 03:38:11.855473 27044 warnings.py:99] /root/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:2351: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")

W1119 03:38:12.148639 27044 warnings.py:99] /root/anaconda3/lib/python3.7/site-packages/skimage/util/arraycrop.py:177: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result.
cropped = ar[slices]

Epoch 0, lr 0.0001: 0%| | 1/1000 [00:01<18:48, 1.13s/it, loss=G_loss=3.4419; PSNR=5.4653; SSIM=0.0264]Traceback (most recent call last):
File "train.py", line 181, in
trainer.train()
File "train.py", line 39, in train
self._run_epoch(epoch)
File "train.py", line 64, in _run_epoch
for data in tq:
File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py", line 937, in iter
for obj in iterable:
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 637, in next
return self._process_next_batch(batch)
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/egan/restore/dataset.py", line 115, in getitem
a, b = self._preprocess(a, b)
File "/egan/restore/dataset.py", line 103, in _preprocess
return map(transpose, self.normalize_fn(img, res))
File "/egan/restore/aug.py", line 52, in process
r = normalize(image=a, target=b)
File "/root/anaconda3/lib/python3.7/site-packages/albumentations/core/composition.py", line 176, in call
data = t(force_apply=force_apply, **data)
File "/root/anaconda3/lib/python3.7/site-packages/albumentations/core/transforms_interface.py", line 87, in call
return self.apply_with_params(params, **kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/albumentations/core/transforms_interface.py", line 100, in apply_with_params
res[key] = target_function(arg, **dict(params, **target_dependencies))
File "/root/anaconda3/lib/python3.7/site-packages/albumentations/augmentations/transforms.py", line 1434, in apply
return F.normalize(image, self.mean, self.std, self.max_pixel_value)
File "/root/anaconda3/lib/python3.7/site-packages/albumentations/augmentations/functional.py", line 141, in normalize
img -= mean
ValueError: operands could not be broadcast together with shapes (256,256,4) (3,) (256,256,4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.