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

Training your own data sets will appear Nan #27

Open
PHI6kai opened this issue Jun 29, 2023 · 3 comments
Open

Training your own data sets will appear Nan #27

PHI6kai opened this issue Jun 29, 2023 · 3 comments

Comments

@PHI6kai
Copy link

PHI6kai commented Jun 29, 2023

I would like to ask if my dataset is not done properly or if something else is not done properly, because my dataset is made according to wireframe
image

@Lyn4444
Copy link

Lyn4444 commented Oct 3, 2023

you batchsize is so small,if you use cpu, set batchsize 32,solve it

@Code-Dataset
Copy link

you batchsize is so small,if you use cpu, set batchsize 32,solve it
您好,请问训练后存在workdir/models中的模型如何在demo_MLSD_flask.py中使用呢?
我运行后报错如下:
Traceback (most recent call last):
File "demo_MLSD_flask.py", line 296, in
init_worker(args)
File "demo_MLSD_flask.py", line 255, in init_worker
model = model_graph(args)
File "demo_MLSD_flask.py", line 86, in init
self.model = self.load(args.model_dir, args.model_type)
File "demo_MLSD_flask.py", line 105, in load
torch_model.load_state_dict(torch.load(model_path, map_location=device), strict=True)
File "C:\Users\ai\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 1671, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for MobileV2_MLSD_Tiny:
Unexpected key(s) in state_dict: "block17.weight", "block17.bias".
size mismatch for backbone.features.0.0.weight: copying a param with shape torch.Size([32, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 4, 3, 3]).

@Akj170245
Copy link

you batchsize is so small,if you use cpu, set batchsize 32,solve it
您好,请问训练后存在workdir/models中的模型如何在demo_MLSD_flask.py中使用呢?
我运行后报错如下:
Traceback (most recent call last):
File "demo_MLSD_flask.py", line 296, in
init_worker(args)
File "demo_MLSD_flask.py", line 255, in init_worker
model = model_graph(args)
File "demo_MLSD_flask.py", line 86, in init
self.model = self.load(args.model_dir, args.model_type)
File "demo_MLSD_flask.py", line 105, in load
torch_model.load_state_dict(torch.load(model_path, map_location=device), strict=True)
File "C:\Users\ai\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 1671, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for MobileV2_MLSD_Tiny:
Unexpected key(s) in state_dict: "block17.weight", "block17.bias".
size mismatch for backbone.features.0.0.weight: copying a param with shape torch.Size([32, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 4, 3, 3]).

Bro, I am facing the issue, please help in resolving this issue.

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

4 participants