Comments (7)
You can substitute the following in:
class ContBatchNorm3d(nn.modules.batchnorm._BatchNorm):
def _check_input_dim(self, input):
if input.dim() != 5:
raise ValueError('expected 5D input (got {}D input)'
.format(input.dim()))
#super(ContBatchNorm3d, self)._check_input_dim(input)
def forward(self, input):
self._check_input_dim(input)
return F.batch_norm(
input, self.running_mean, self.running_var, self.weight, self.bias,
True, self.momentum, self.eps)
from vnet.pytorch.
Hi,
I can't run through your ContBatchNorm2d code. It returns to me an error about "AttributeError: 'super' object has no attribute '_check_input_dim'".
I want to know why you write code like this, what if I use F.barchnorm3d directly?
Thank you very much.
I also encountered this problem today, did you solve the problem now?
from vnet.pytorch.
@jphdotam Thank you for the fix. I can confirm this works. Weird how this issue has been open for 2.5 years and has not been committed to the repo.
from vnet.pytorch.
Dear @rayryeng I went on to find this network was very poor and could barely fit. I ended up rolling my own 3D Unet which worked MUCH better with fewer parameters: https://github.com/jphdotam/Unet3D
from vnet.pytorch.
@jphdotam thanks! I'll take a look after I finish with some experiments. I'm currently training something right now and will also take a look at yours.
Edit: oh wow fresh off the press! Thanks for sharing it with the community!
from vnet.pytorch.
@jphdotam Why make the batch_norm always the training mode in ContBatchNorm3d?
from vnet.pytorch.
Hi,
I had the same issue. The problem is the super class of ContBatchNorm3d is _BatchNorm, but _BatchNorm has not a _check_input_dim method. I don't think that commenting the code is the right fix. IMHO it should be a change in the inheritance to BatchNorm3d and commenting the double check like this:
class ContBatchNorm3d(nn.modules.batchnorm.BatchNorm3d):
def _check_input_dim(self, input):
#if input.dim() != 5:
# raise ValueError('expected 5D input (got {}D input)'
# .format(input.dim()))
super()._check_input_dim(input)
def forward(self, input):
self._check_input_dim(input)
return F.batch_norm(
input, self.running_mean, self.running_var, self.weight, self.bias,
True, self.momentum, self.eps)
from vnet.pytorch.
Related Issues (20)
- What augmentation is used? HOT 1
- A comrehensive Readme file? HOT 3
- How to test my segmentation after training?
- The implementation of the decoder is different than the architecture posted here.
- how to do cross validation?
- Concatenation operation in InputTransition causing confusion and memory abuse HOT 1
- torchbiomed's problem HOT 2
- hi,i have question about trian
- list index out of range HOT 6
- There are not many bugs in your code. HOT 3
- How can I install torchbiomed HOT 3
- model complie error HOT 3
- Question about up-convolution block HOT 2
- Questions about implementation still actual ?
- there are too
- ε εηΈδΊ
- Fine-grained featrues forwarding
- OutputTransition
- Under which file should the dataset be placed
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.
from vnet.pytorch.