Giter Club home page Giter Club logo

oct2confocal_3dcyclegan's People

Contributors

xintian-99 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

xudong-ma

oct2confocal_3dcyclegan's Issues

Error in cal_gradient_loss_3d, RuntimeError: expected stride to be a single integer value or a list of 4 values to match the convolution dimensions, but got stride=[1, 1, 1]

I got the following error:

Traceback (most recent call last):
File "/kaggle/working/OCT2Confocal_3DCycleGAN/train.py", line 52, in
model.optimize_parameters() # calculate loss functions, get gradients, update network weights
File "/kaggle/working/OCT2Confocal_3DCycleGAN/models/cycle_gan_model.py", line 208, in optimize_parameters
self.backward_G() # calculate gradients for G_A and G_B
File "/kaggle/working/OCT2Confocal_3DCycleGAN/models/cycle_gan_model.py", line 193, in backward_G
self.loss_GL_A = networks.cal_gradient_loss_3d(self.real_A, self.fake_A, self.device) * lambda_GL
File "/kaggle/working/OCT2Confocal_3DCycleGAN/models/networks.py", line 327, in cal_gradient_loss_3d
grad_x_fake = F.conv3d(fake_data, filter_x, padding=1, groups=channels)
RuntimeError: expected stride to be a single integer value or a list of 4 values to match the convolution dimensions, but got stride=[1, 1, 1]

After this error I modify the line 237 in netwroks.py from
grad_x_fake = F.conv3d(fake_data, filter_x, padding=1, groups=channels)
to
grad_x_fake = F.conv3d(fake_data, filter_x, padding=1, groups=channels, stride=1)
and
grad_x_fake = F.conv3d(fake_data, filter_x, padding=1, groups=channels, stride=(1,1,1))
but the error remains.

Traceback (most recent call last):
File "/kaggle/working/OCT2Confocal_3DCycleGAN/train.py", line 52, in
model.optimize_parameters() # calculate loss functions, get gradients, update network weights
File "/kaggle/working/OCT2Confocal_3DCycleGAN/models/cycle_gan_model.py", line 208, in optimize_parameters
self.backward_G() # calculate gradients for G_A and G_B
File "/kaggle/working/OCT2Confocal_3DCycleGAN/models/cycle_gan_model.py", line 193, in backward_G
self.loss_GL_A = networks.cal_gradient_loss_3d(self.real_A, self.fake_A, self.device) * lambda_GL
File "/kaggle/working/OCT2Confocal_3DCycleGAN/models/networks.py", line 327, in cal_gradient_loss_3d
grad_x_fake = F.conv3d(fake_data, filter_x, padding=1, groups=channels, stride=1)
RuntimeError: expected stride to be a single integer value or a list of 4 values to match the convolution dimensions, but got stride=[1, 1, 1]

Does anyone have any suggestions?

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.