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

TDM2 #37044

Merged
merged 27 commits into from
Nov 26, 2021
Merged

TDM2 #37044

merged 27 commits into from
Nov 26, 2021

Conversation

wangzhen38
Copy link
Contributor

@wangzhen38 wangzhen38 commented Nov 8, 2021

PR types

New features

PR changes

APIs

Describe

Add sample function in InMemoryDataset. In TDM model, you can augment data in this way:

self.reader, self.file_list = get_reader(self.input_data, config)
tree_path = config.get("hyper_parameters.tree_path", None)
self.reader.load_into_memory()
self.reader.tdm_sample(
        config.get("hyper_parameters.tree_name"), tree_path,
        config.get("hyper_parameters.tdm_layer_counts"),
        config.get("hyper_parameters.start_sample_layer", 1),
        config.get("hyper_parameters.with_hierachy", False),
        config.get("hyper_parameters.seed", 0),
        config.get("hyper_parameters.id_slot", 0))
<train your model>
self.reader.release_memory()

@paddle-bot-old
Copy link

paddle-bot-old bot commented Nov 8, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Nov 8, 2021

✅ This PR's description meets the template requirements!
Please wait for other CI results.

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG API

@frankwhzhang frankwhzhang merged commit 4826167 into PaddlePaddle:develop Nov 26, 2021
Zjq9409 pushed a commit to Zjq9409/Paddle that referenced this pull request Dec 10, 2021
* add tdm sample

* add tdm sample in c++

* update tdm sample

* modify sample count

* fix conflict

* add set_date

* fix cmake error

* fix bug of proto

* update index_dataset proto

* update cmake

* fix error cmake

* fix cmake mkldnn

* fix cmake proto

* update cmake proto

* update cmake

* update rec

* update dataset

* update dataset

* update dataset

* updata dataset

* updata dataset

* updata coverage

* updata ci

* goback4

* fix npu ci

* add xxhash dep
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

Successfully merging this pull request may close these issues.

6 participants