forked from mindspore-Ecosystem/mindspore
!8835 [ModelZoo]Fix bgcf config error
From: @zhan_ke Reviewed-by: @yingjy,@oacjiewen Signed-off-by: @yingjy
This commit is contained in:
commit
67bdad39ed
|
@ -132,7 +132,6 @@ Parameters for both training and evaluation can be set in config.py.
|
|||
"input_dim": 64, # User and item embedding dimension
|
||||
"l2": 0.03 # l2 coefficient
|
||||
"neighbor_dropout": [0.0, 0.2, 0.3]# Dropout ratio for different aggregation layer
|
||||
"num_graphs":5 # Num of sample graph
|
||||
```
|
||||
config.py for more configuration.
|
||||
|
||||
|
@ -193,21 +192,32 @@ Parameters for both training and evaluation can be set in config.py.
|
|||
```
|
||||
# [Model Description](#contents)
|
||||
## [Performance](#contents)
|
||||
|
||||
### Evaluation Performance
|
||||
| Parameter | BGCF |
|
||||
| ------------------------------------ | ----------------------------------------- |
|
||||
| Model Version | Inception V1 |
|
||||
| Resource | Ascend 910 |
|
||||
| uploaded Date | 09/23/2020(month/day/year) |
|
||||
| MindSpore Version | 1.0.0 |
|
||||
| Dataset | Amazon-Beauty |
|
||||
| Training Parameter | epoch=600 |
|
||||
| Training Parameter | epoch=600,steps=12,batch_size=5000,lr=0.001 |
|
||||
| Optimizer | Adam |
|
||||
| Loss Function | BPR loss |
|
||||
| Recall@20 | 0.1534 |
|
||||
| NDCG@20 | 0.0912 |
|
||||
| Training Cost | 25min |
|
||||
| Scripts | [bgcf script](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/gnn/bgcf) |
|
||||
|
||||
### Inference Performance
|
||||
| Parameter | BGCF |
|
||||
| ------------------------------------ | ----------------------------------------- |
|
||||
| Model Version | Inception V1 |
|
||||
| Resource | Ascend 910 |
|
||||
| uploaded Date | 09/23/2020(month/day/year) |
|
||||
| MindSpore Version | 1.0.0 |
|
||||
| Dataset | Amazon-Beauty |
|
||||
| Batch_size | 5000 |
|
||||
| Output | probability |
|
||||
| Recall@20 | 0.1534 |
|
||||
| NDCG@20 | 0.0912 |
|
||||
# [Description of random situation](#contents)
|
||||
|
||||
BGCF model contains lots of dropout operations, if you want to disable dropout, set the neighbor_dropout to [0.0, 0.0, 0.0] in src/config.py.
|
||||
|
|
|
@ -24,16 +24,13 @@ def parser_args():
|
|||
parser.add_argument("-d", "--dataset", type=str, default="Beauty", help="choose which dataset")
|
||||
parser.add_argument("-dpath", "--datapath", type=str, default="./scripts/data_mr", help="minddata path")
|
||||
parser.add_argument("-de", "--device", type=str, default='0', help="device id")
|
||||
parser.add_argument('--seed', type=int, default=0, help="random seed")
|
||||
parser.add_argument('--Ks', type=list, default=[5, 10, 20, 100], help="top K")
|
||||
parser.add_argument('--test_ratio', type=float, default=0.2, help="test ratio")
|
||||
parser.add_argument('-w', '--workers', type=int, default=8, help="number of process")
|
||||
parser.add_argument('-w', '--workers', type=int, default=8, help="number of process to generate data")
|
||||
parser.add_argument("-ckpt", "--ckptpath", type=str, default="./ckpts", help="checkpoint path")
|
||||
|
||||
parser.add_argument("-eps", "--epsilon", type=float, default=1e-8, help="optimizer parameter")
|
||||
parser.add_argument("-lr", "--learning_rate", type=float, default=1e-3, help="learning rate")
|
||||
parser.add_argument("-l2", "--l2", type=float, default=0.03, help="l2 coefficient")
|
||||
parser.add_argument("-wd", "--weight_decay", type=float, default=0.01, help="weight decay")
|
||||
parser.add_argument("-act", "--activation", type=str, default='tanh', choices=['relu', 'tanh'],
|
||||
help="activation function")
|
||||
parser.add_argument("-ndrop", "--neighbor_dropout", type=list, default=[0.0, 0.2, 0.3],
|
||||
|
@ -52,7 +49,4 @@ def parser_args():
|
|||
parser.add_argument("-emb", "--embedded_dimension", type=int, default=64, help="output embedding dim")
|
||||
parser.add_argument('--dist_reg', type=float, default=0.003, help="distance loss coefficient")
|
||||
|
||||
parser.add_argument('-ng', '--num_graphs', type=int, default=5, help="num of sample graph")
|
||||
parser.add_argument('-geps', '--graph_epsilon', type=float, default=0.01, help="node copy parameter")
|
||||
|
||||
return parser.parse_args()
|
||||
|
|
Loading…
Reference in New Issue