Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
chenhaozhe ff7b42f2ab | 2 years ago | |
---|---|---|
.. | ||
amazon_beauty | 2 years ago | |
citeseer | 2 years ago | |
cora | 2 years ago | |
pubmed | 2 years ago | |
sns | 2 years ago | |
README.md | 2 years ago | |
graph_map_schema.py | 2 years ago | |
read_citeseer.sh | 2 years ago | |
read_cora.sh | 2 years ago | |
reader.py | 2 years ago | |
requirements.txt | 2 years ago | |
write_citeseer.sh | 2 years ago | |
write_cora.sh | 2 years ago | |
write_pubmed.sh | 2 years ago | |
write_sns.sh | 2 years ago | |
writer.py | 2 years ago |
This example provides an efficient way to generate MindRecord. Users only need to define the parallel granularity of training data reading and the data reading function of a single task. That is, they can efficiently convert the user's training data into MindRecord.
1.write_cora.sh: entry script, users need to modify parameters according to their own training data.
2.writer.py: main script, called by write_cora.sh, it mainly reads user training data in parallel and generates MindRecord.
3.cora/mr_api.py: uers define their own parallel granularity of training data reading and single task reading function through the cora.
Download and prepare the Cora dataset as required.
Edit write_cora.sh and modify the parameters
--mindrecord_file: output MindRecord file.
--mindrecord_partitions: the partitions for MindRecord.
Run the bash script
bash write_cora.sh
Assume the dataset name is 'xyz'
cd ${your_mindspore_home}/example/graph_to_mindrecord
cp -r cora xyz
Edit dictionary data generator.
cd ${your_mindspore_home}/example/graph_to_mindrecord
vi xyz/mr_api.py
Two API, 'mindrecord_task_number' and 'mindrecord_dict_data', must be implemented.
Run python script
cd ${your_mindspore_home}/example/graph_to_mindrecord
python writer.py --mindrecord_script xyz [...]
You can put this command in script write_xyz.sh for easy execution
Models of MindSpore
Python Shell Unity3D Asset C++ Markdown other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》