oct2confocal_3dcyclegan's People
Forkers
xudong-maoct2confocal_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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.