Giter Site home page Giter Site logo

Comments (9)

uduse avatar uduse commented on August 27, 2024

@o0windseed0o can you paste your complete config file here? It's probably an iteration boundary related bug somewhere in our code.

from matchzoo.

o0windseed0o avatar o0windseed0o commented on August 27, 2024

@uduse Thanks for your reply! Please see the following.

{
 "net_name": "match_pyramid",
  "global":{
      "model_type": "PY",
      "weights_file": "examples/QA/weights/matchpyramid_classify.weights",
      "save_weights_iters": 10,
      "num_iters": 200,
      "display_interval": 10,
      "test_weights_iters": 200,
      "optimizer": "adam",
      "learning_rate": 0.0001
  },
  "inputs": {
    "share": {
        "text1_corpus": "./data/QA/corpus_preprocessed.txt",
        "text2_corpus": "./data/QA/corpus_preprocessed.txt",
        "use_dpool": true,
        "embed_size": 100,
        "train_embed": true,
        "vocab_size": 28780,
        "target_mode": "classification",
        "class_num": 2,
        "text1_maxlen": 25,
        "text2_maxlen": 50
    },
    "train": {
        "input_type": "PointGenerator", 
        "phase": "TRAIN",
        "use_iter": false,
        "query_per_iter": 20,
        "batch_per_iter": 5,
        "batch_size": 100,
        "relation_file": "./data/QA/relation_train.txt"
    },
    "valid": {
        "input_type": "PointGenerator", 
        "phase": "EVAL",
        "batch_size": 100,
        "relation_file": "./data/QA/relation_train.txt"
    },
    "test": {
        "input_type": "PointGenerator", 
        "phase": "EVAL",
        "batch_size": 100,
        "relation_file": "./data/QA/relation_test.txt"
    },
    "predict": {
        "input_type": "PointGenerator", 
        "phase": "PREDICT",
        "batch_size": 50,
        "relation_file": "./data/QA/relation_test.txt"
    }
  },
  "outputs": {
    "predict": {
      "save_format": "TEXTNET",
      "save_path": "predict.test.medqa_matchpyramid_classify.txt"
    }
  },
  "model": {
    "model_path": "matchzoo/models/",
    "model_py": "matchpyramid.MatchPyramid",
    "setting": {
        "kernel_count": 32, 
        "kernel_size": [3, 3], 
        "dpool_size": [3, 10],
        "dropout_rate": 0.5
    }
  },
  "losses": [
    {
       "object_name": "categorical_crossentropy",
       "object_params": {}
    }
  ],
  "metrics": [ "accuracy" ]
}

There are several paramters in the config file that I don't know how to set, such as query_per_iter and bath_per_iter. Are there any instructions or introductions on how to write config files?

As to the error, if it's not related to the config file, it might be the operation on generating batches, since the missing samples are always the last ones.

from matchzoo.

o0windseed0o avatar o0windseed0o commented on August 27, 2024

Have you figured out what caused the problem? Or can anybody tell me which py file should be checked, related to the batch generator?

from matchzoo.

uduse avatar uduse commented on August 27, 2024

@o0windseed0o haven't got a chance to dive into the problem yet. You might want to look at PointGenerator class.

from matchzoo.

o0windseed0o avatar o0windseed0o commented on August 27, 2024

@uduse I have checked the PointerGenerator class, and I think the problem should be around the while True loop in the get_batch_generator function. There are no operations on how to deal with those samples that cannot be built up to a batch. Please check from here when you are free. Thank you!

from matchzoo.

bwanglzu avatar bwanglzu commented on August 27, 2024

Need to figure out whether a bug exist.

from matchzoo.

Genie-Liu avatar Genie-Liu commented on August 27, 2024

Today I come to the same situation: I have 5000 prediction samples, and it output 4998 predicts.
But no matter how I change my batch_size, the output is always 4998.
Then later I found that there's duplicate samples in my prediction sample.

@o0windseed0o Not sure if you have the duplicate sample.

@bwanglzu By the way, can the model fixed the duplicate situation?

from matchzoo.

bwanglzu avatar bwanglzu commented on August 27, 2024

Apparently there's something wrong in Generator, I guess @faneshion and @yangliuy are the right person to ask.

@Genie-Liu and you provide a bit more context?

from matchzoo.

bwanglzu avatar bwanglzu commented on August 27, 2024

@faneshion any ideas?

from matchzoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.