dsp-uga / brainchild Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Description of the Error:
=================================== FAILURES ===================================
______________________________ test_ppmi_dataset _______________________________
capsys = <_pytest.capture.CaptureFixture object at 0x7f5d5ac45588>
def test_ppmi_dataset(capsys):
data_dir = './data/PPMI_reg'
ds = brainchild.loader.PPMIData(data_dir)
with capsys.disabled():
print(ds[0])
tests/loader_test.py:19:
brainchild/loader.py:42: in getitem
img = nibabel.load(meta['path'])
../../anaconda3/lib/python3.6/site-packages/nibabel/loadsave.py:43: in load
is_valid, sniff = image_klass.path_maybe_image(filename, sniff)
../../anaconda3/lib/python3.6/site-packages/nibabel/filebasedimages.py:499: in path_maybe_image
klass._compressed_suffixes)
../../anaconda3/lib/python3.6/site-packages/nibabel/filename_parser.py:266: in splitext_addext
if endswith(filename, ext):
whole = PosixPath('data/PPMI_reg/3004/sag_3D_FSPGR_BRAVO_straight/2011-04-05_14_45_45.0/S113507/PPMI_3004_MR_sag_3D_FSPGR_BRAVO_straight__br_raw_20110705113608182_33_S113507_I243167.nii')
end = '.gz'
def _iendswith(whole, end):
return whole.lower().endswith(end.lower())
E AttributeError: 'PosixPath' object has no attribute 'lower'
../../anaconda3/lib/python3.6/site-packages/nibabel/filename_parser.py:224: AttributeError
====================== 1 failed, 2 passed in 4.32 seconds ======================
Parameters Initialized.
Process Started with Seed, 100
VNET Config.
ValueError Traceback (most recent call last)
in ()
1 if name == 'main':
----> 2 main()
in main()
168 #Set Optimization parameters.
169 adjust_opt(opt_algo, optimizer, epoch)
--> 170 train_nll(is_cuda, epoch, model, trainLoader, optimizer, trainF, class_weights)
171 err = test_nll(is_cuda, epoch, model, testLoader, optimizer, testF, class_weights)
172 is_best = False
in train_nll(is_cuda, epoch, model, trainLoader, optimizer, trainF, weights)
9 data, target = Variable(data), Variable(target)
10 optimizer.zero_grad()
---> 11 output = model(data)
12 target = target.view(target.numel())
13 loss = F.nll_loss(output, target, weight=weights)
~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
355 result = self._slow_forward(*input, **kwargs)
356 else:
--> 357 result = self.forward(*input, **kwargs)
358 for hook in self._forward_hooks.values():
359 hook_result = hook(self, input, result)
~/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py in forward(self, *inputs, **kwargs)
66 def forward(self, *inputs, **kwargs):
67 if not self.device_ids:
---> 68 return self.module(*inputs, **kwargs)
69 inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)
70 if len(self.device_ids) == 1:
~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
355 result = self._slow_forward(*input, **kwargs)
356 else:
--> 357 result = self.forward(*input, **kwargs)
358 for hook in self._forward_hooks.values():
359 hook_result = hook(self, input, result)
~/localgit/brainchild/brainchild/vnet.py in forward(self, x)
208
209 def forward(self, x):
--> 210 out16 = self.in_tr(x)
211 out32 = self.down_tr32(out16)
212 out64 = self.down_tr64(out32)
~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
355 result = self._slow_forward(*input, **kwargs)
356 else:
--> 357 result = self.forward(*input, **kwargs)
358 for hook in self._forward_hooks.values():
359 hook_result = hook(self, input, result)
~/localgit/brainchild/brainchild/vnet.py in forward(self, x)
83 def forward(self, x):
84 # do we want a PRELU here as well?
---> 85 out = self.bn1(self.conv1(x))
86 # split input in to 16 channels
87 x16 = torch.cat((x, x, x, x, x, x, x, x,
~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
355 result = self._slow_forward(*input, **kwargs)
356 else:
--> 357 result = self.forward(*input, **kwargs)
358 for hook in self._forward_hooks.values():
359 hook_result = hook(self, input, result)
~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/conv.py in forward(self, input)
386 def forward(self, input):
387 return F.conv3d(input, self.weight, self.bias, self.stride,
--> 388 self.padding, self.dilation, self.groups)
389
390
~/anaconda3/lib/python3.6/site-packages/torch/nn/functional.py in conv3d(input, weight, bias, stride, padding, dilation, groups)
119
120 if input is not None and input.dim() != 5:
--> 121 raise ValueError("Expected 5D tensor as input, got {}D tensor instead.".format(input.dim()))
122
123 f = _ConvNd(_triple(stride), _triple(padding), _triple(dilation), False,
ValueError: Expected 5D tensor as input, got 4D tensor instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.