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

请问出错,提示找不到config_file',如何解决为什么?谢谢! #62

Open
Bamboo-TNLP opened this issue Apr 4, 2019 · 12 comments

Comments

@Bamboo-TNLP
Copy link

No description provided.

@chaotianjiao
Copy link

同问,我也是一样的

@gentlexia
Copy link

您好,请问解决了吗

@ghost
Copy link

ghost commented Jul 1, 2019

可以试一下在main.py上面的train和clean,吧false修改成true

@hh2master
Copy link

同问,缺少config_file

@smartcatdog
Copy link

可以试一下在main.py上面的train和clean,吧false修改成true

我这边试了下python main.py --train=True --clean=True,可是报错:

File "main.py", line 219, in main
    train()
  File "main.py", line 150, in train
    train_manager = BatchManager(train_data, FLAGS.batch_size)
  File "ChineseNER/data_utils.py", line 285, in __init__
    self.batch_data = self.sort_and_pad(data, batch_size)
  File "ChineseNER/data_utils.py", line 293, in sort_and_pad
    batch_data.append(self.pad_data(sorted_data[i*batch_size : (i+1)*batch_size]))
TypeError: slice indices must be integers or None or have an __index__ method

这个问题有碰到过么,感觉是没有数据产生,但是理论上不应该哇

@hh2master
Copy link

hh2master commented Sep 22, 2019 via email

@fzc1027
Copy link

fzc1027 commented Oct 8, 2019

You should fix the type of batch_size. ,please insert int before batch_size.

@hh2master
Copy link

hh2master commented Oct 9, 2019 via email

@BestyWang
Copy link

可以试一下在main.py上面的train和clean,吧false修改成true

我这边试了下python main.py --train=True --clean=True,可是报错:

File "main.py", line 219, in main
    train()
  File "main.py", line 150, in train
    train_manager = BatchManager(train_data, FLAGS.batch_size)
  File "ChineseNER/data_utils.py", line 285, in __init__
    self.batch_data = self.sort_and_pad(data, batch_size)
  File "ChineseNER/data_utils.py", line 293, in sort_and_pad
    batch_data.append(self.pad_data(sorted_data[i*batch_size : (i+1)*batch_size]))
TypeError: slice indices must be integers or None or have an __index__ method

这个问题有碰到过么,感觉是没有数据产生,但是理论上不应该哇

batch_data.append(self.pad_data(sorted_data[int(i*batch_size) :int((i+1)*batch_size)]))

@shihuanting
Copy link

@BestyWang 改了之后还是报错
AttributeError: 'bool' object has no attribute 'config_file'

@shihuanting
Copy link

@hh2master 大哥怎么解决的。

@niubao123
Copy link

You should fix the type of batch_size. ,please insert int before batch_size.

解决了谢谢

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

9 participants