lsvih / Sliding-Convolution

Pytorch implementation of "Scene Text Recognition with Sliding Convolutional Character Models"
MIT License
14 stars 8 forks source link

训练报错 #4

Closed LiDaiyang1205 closed 4 years ago

LiDaiyang1205 commented 4 years ago

您好,我在运行训练模型时,报错如下: test setup failed file /home/ldy/state_of_art/Sliding-Convolution-master/dataloader.py, line 67 def test_fn(batch): E fixture 'batch' not found

  available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.

/home/ldy/state_of_art/Sliding-Convolution-master/dataloader.py:67 E test setup failed file /home/ldy/state_of_art/Sliding-Convolution-master/main.py, line 67 def test(model, test_loader): E fixture 'model' not found

  available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.
lsvih commented 4 years ago

你好,看起来你使用了 pytest 运行此程序,然后 pytest 把模型中 testtest_fn 函数当做是单元测试了。请直接用 python 运行或者暂时关闭 pytest