欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mxnet ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64‘).

程序员文章站 2022-05-27 11:31:41
...
Traceback (most recent call last):
  File "train_0723.py", line 455, in <module>
    main()
  File "train_0723.py", line 451, in main
    train_net(args)
  File "train_0723.py", line 445, in train_net
    epoch_end_callback=epoch_cb)
  File "/home/user1/recognition/parall_module_local_v1_gluon_group.py", line 612, in fit
    batch_end_callback(batch_end_params)
  File "train_0723.py", line 335, in _batch_callback
    acc_list = ver_test(mbatch)
  File "train_0723.py", line 292, in ver_test
    None, None)
  File "eval/verification.py", line 273, in test
    embeddings = sklearn.preprocessing.normalize(embeddings)
  File "/home/user1/miniconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 73, in inner_f
    return f(**kwargs)
  File "/home/user1/miniconda3/lib/python3.7/site-packages/sklearn/preprocessing/_data.py", line 1711, in normalize
    estimator='the normalize function', dtype=FLOAT_DTYPES)
  File "/home/user1/miniconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 73, in inner_f
    return f(**kwargs)
  File "/home/user1/miniconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 646, in check_array
    allow_nan=force_all_finite == 'allow-nan')
  File "/home/user1/miniconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 100, in _assert_all_finite
    msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
相关标签: MxNet # DL-报错