-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Shrinkage Loss to handle regression label imbalance problem. (#1157)
*Issue #, if available:* *Description of changes:* This PR follows the paper: https://openaccess.thecvf.com/content_ECCV_2018/html/Xiankai_Lu_Deep_Regression_Tracking_ECCV_2018_paper.html to implement the Shrinkage Loss for imbalanced regression tasks. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Xiang Song <[email protected]> Co-authored-by: Jian Zhang (James) <[email protected]>
- Loading branch information
1 parent
deac15b
commit 72f11f3
Showing
16 changed files
with
294 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
service ssh restart | ||
|
||
DGL_HOME=/root/dgl | ||
GS_HOME=$(pwd) | ||
NUM_TRAINERS=1 | ||
export PYTHONPATH=$GS_HOME/python/ | ||
cd $GS_HOME/training_scripts/gsgnn_np | ||
echo "127.0.0.1" > ip_list.txt | ||
|
||
cd $GS_HOME/inference_scripts/ep_infer | ||
echo "127.0.0.1" > ip_list.txt | ||
|
||
cat ip_list.txt | ||
|
||
error_and_exit () { | ||
# check exec status of launch.py | ||
status=$1 | ||
echo $status | ||
|
||
if test $status -ne 0 | ||
then | ||
exit -1 | ||
fi | ||
} | ||
|
||
echo "Test GraphStorm node regression" | ||
|
||
date | ||
|
||
echo "**************dataset: Test node regression, RGCN layer: 1, node feat: fixed HF BERT, BERT nodes: movie, inference: mini-batch" | ||
python3 -m graphstorm.run.gs_node_regression --workspace $GS_HOME/training_scripts/gsgnn_np/ --num-trainers $NUM_TRAINERS --num-servers 1 --num-samplers 0 --part-config /data/movielen_100k_train_val_1p_4t/movie-lens-100k.json --ip-config ip_list.txt --ssh-port 2222 --cf ml_nr.yaml --num-epochs 1 | ||
|
||
error_and_exit $? | ||
|
||
echo "**************dataset: Test node regression, RGCN layer: 1, node feat: fixed HF BERT, BERT nodes: movie, inference: mini-batch, with shrinkage loss" | ||
python3 -m graphstorm.run.gs_node_regression --workspace $GS_HOME/training_scripts/gsgnn_np/ --num-trainers $NUM_TRAINERS --num-servers 1 --num-samplers 0 --part-config /data/movielen_100k_train_val_1p_4t/movie-lens-100k.json --ip-config ip_list.txt --ssh-port 2222 --cf ml_nr.yaml --num-epochs 1 --regression-loss-func shrinkage | ||
|
||
error_and_exit $? | ||
|
||
rm -fr $GS_HOME/training_scripts/gsgnn_np/logs/ | ||
|
||
date | ||
|
||
echo 'Done' |
Oops, something went wrong.