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

The matching scores are all equal when training and the model can not converge. #3

Open
rabbitcj opened this issue Oct 10, 2018 · 3 comments

Comments

@rabbitcj
Copy link

I am trying to train the model on douban data named "data_small.pkl" .
My question: The matching scores are all equal when training and the model can not converge.

The data is downloaded from the link in “ReadMe.txt”.

  • tersorflow 1.8
  • python 3.5

1. Here is the dir structrue.

data/douban/
|-- data.pkl
|-- data_small.pkl
|-- dev.txt
|-- test.txt
|-- train.txt
|-- word2id
`-- word_embedding.pkl

2. Here, here's the main.py for training.

conf = {
    "data_path": "./data/douban/data_small.pkl",
    "save_path": "./output/douban/DAM/",
    "word_emb_init": "./data/douban/word_embedding.pkl",
    "init_model": None, #"./output/douban/DAM_cross/DAM.ckpt", #should be set for test
    
    "rand_seed": None, 

    "drop_dense": None,
    "drop_attention": None,

    "is_mask": True,
    "is_layer_norm": True,
    "is_positional": False,  

    "stack_num": 5,  
    "attention_type": "dot",

    "learning_rate": 1e-3,
    "vocab_size": 172130, #434512
    "emb_size": 200,
    "batch_size": 256, #200 for test

    "max_turn_num": 9,  
    "max_turn_len": 50, 

    "max_to_keep": 1,
    "num_scan_data": 2,
    "_EOS_": 1, #28270
    "final_n_class": 1,
}
@xyzhou-puck
Copy link
Collaborator

Hi, please modify "data_path": "./data/douban/data_small.pkl", to "./data/douban/data.pkl" and try it again.

Xiangyang

@rabbitcj
Copy link
Author

After modifing "data_path", it works. Why?

@xyzhou-puck
Copy link
Collaborator

After modifing "data_path", it works. Why?

Because ``data_small.pkl" is for code-debug and it only has a few training instances.

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

2 participants