Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.py运行报错,预处理后的路径设置好了 #156

Open
wangy-alt opened this issue May 19, 2022 · 2 comments
Open

test.py运行报错,预处理后的路径设置好了 #156

wangy-alt opened this issue May 19, 2022 · 2 comments

Comments

@wangy-alt
Copy link

root@468c2519de72:/workspace/GaitPart# python train.py
Initialzing...
Initializing data source...
Loading training data...
libpng error: IDAT: incorrect data check
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 56, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
AttributeError: 'NoneType' object has no attribute 'reshape'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 18, in
m = initialization(conf, train=opt.cache)[0]
File "/workspace/GaitPart/model/initialization.py", line 57, in initialization
train_source, test_source = initialize_data(config, train, test)
File "/workspace/GaitPart/model/initialization.py", line 18, in initialize_data
train_source.load_all_data()
File "/workspace/GaitPart/model/utils/data_set.py", line 45, in load_all_data
self.load_data(i)
File "/workspace/GaitPart/model/utils/data_set.py", line 48, in load_data
return self.getitem(index)
File "/workspace/GaitPart/model/utils/data_set.py", line 62, in getitem
data = [self.loader(_path) for _path in self.seq_dir[index]]
File "/workspace/GaitPart/model/utils/data_set.py", line 62, in
data = [self.loader(_path) for _path in self.seq_dir[index]]
File "/workspace/GaitPart/model/utils/data_set.py", line 51, in loader
return self.img2xarray(
File "/workspace/GaitPart/model/utils/data_set.py", line 76, in img2xarray
frame_list = [np.reshape(
File "/workspace/GaitPart/model/utils/data_set.py", line 76, in
frame_list = [np.reshape(
File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 292, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 66, in _wrapfunc
return _wrapit(obj, method, *args, **kwds)
File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 46, in _wrapit
result = getattr(asarray(obj), method)(*args, **kwds)
ValueError: cannot reshape array of size 1 into shape (64,64,newaxis)

@wyp196
Copy link

wyp196 commented Jul 12, 2022

我也是这个问题,请问您解决了吗

@zhang123-sys
Copy link

image
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for SetNet:
Missing key(s) in state_dict: "set_layer1.forward_block.conv.weight", "set_layer2.forward_block.conv.weight", "set_layer3.forward_block.conv.weight", "set_layer4.forward_block.conv.weight", "set_layer5.forward_block.conv.weight", "set_layer6.forward_block.conv.weight", "gl_layer1.conv.weight", "gl_layer2.conv.weight", "gl_layer3.conv.weight", "gl_layer4.conv.weight", "fc_bin.0".
Unexpected key(s) in state_dict: "module.set_layer1.forward_block.conv.weight", "module.set_layer2.forward_block.conv.weight", "module.set_layer3.forward_block.conv.weight", "module.set_layer4.forward_block.conv.weight", "module.set_layer5.forward_block.conv.weight", "module.set_layer6.forward_block.conv.weight", "module.gl_layer1.conv.weight", "module.gl_layer2.conv.weight", "module.gl_layer3.conv.weight", "module.gl_layer4.conv.weight", "module.fc_bin.0".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants