deepinsight / deepinsight/insightface

AssertionError: output length 1 not a multiple of slice batch_size 128

Open
#1,366 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29.7k
Forks
6.1k
PR merge metrics
No merged PRs in 30d

Description

When I was training, I encountered the following error。MxNet version is 1.6.0
**This is my config info:**

Called with argument: Namespace(batch_size=128, ckpt=3, ctx_num=1, dataset='emore', frequent=20, image_channel=3, kvstore='device', loss='softmax', lr=0.1, lr_steps='100000,160000,220000', models_root='./models', mom=0.9, network='m1', per_batch_size=128, pretrained='', pretrained_epoch=1, rescale_threshold=0, verbose=2000, wd=0.0005) {'bn_mom': 0.9, 'workspace': 256, 'emb_size': 256, 'ckpt_embedding': True, 'net_se': 0, 'net_act': 'prelu', 'net_unit': 3, 'net_input': 1, 'net_blocks': [1, 4, 6, 2], 'net_output': 'GDC', 'net_multiplier': 1.0, 'val_targets': ['lfw'], 'ce_loss': True, 'fc7_lr_mult': 1.0, 'fc7_wd_mult': 1.0, 'fc7_no_bias': False, 'max_steps': 0, 'data_rand_mirror': True, 'data_cutoff': False, 'data_color': 0, 'data_images_filter': 0, 'count_flops': True, 'memonger': False, 'loss_name': 'softmax', 'net_name': 'fmobilenet', 'dataset': 'emore', 'dataset_path': '../datasets/faces_emore', 'num_classes': 85742, 'image_shape': [112, 112, 3], 'loss': 'softmax', 'network': 'm1', 'num_workers': 1, 'batch_size': 128, 'per_batch_size': 128}

**The error info:**
Traceback (most recent call last):
File "train.py", line 483, in
main()
File "train.py", line 479, in main
train_net(args)
File "train.py", line 473, in train_net
epoch_end_callback=epoch_cb)
File "/opt/mxnet/python/mxnet/module/base_module.py", line 536, in fit
self.update_metric(eval_metric, data_batch.label, False, data_batch.pad)
File "/opt/mxnet/python/mxnet/module/module.py", line 777, in update_metric
self._exec_group.update_metric(eval_metric, labels, pre_sliced, label_pads)
File "/opt/mxnet/python/mxnet/module/executor_group.py", line 661, in update_metric
out.shape[0], islice_batch_size)
AssertionError: output length 1 not a multiple of slice batch_size 128

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.