forked from OSSInnovation/mindspore
!6393 bugfix delete batch_size
Merge pull request !6393 from yoonlee666/master
This commit is contained in:
commit
db0c0caf10
|
@ -235,7 +235,7 @@ def run_ner():
|
|||
ds.get_dataset_size(), epoch_num, "ner")
|
||||
|
||||
if args_opt.do_eval.lower() == "true":
|
||||
ds = create_ner_dataset(batch_size=bert_net_cfg.batch_size, repeat_count=1,
|
||||
ds = create_ner_dataset(batch_size=optimizer_cfg.batch_size, repeat_count=1,
|
||||
assessment_method=assessment_method, data_file_path=args_opt.eval_data_file_path,
|
||||
schema_file_path=args_opt.schema_file_path,
|
||||
do_shuffle=(args_opt.eval_data_shuffle.lower() == "true"))
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
echo "=============================================================================================================="
|
||||
echo "Please run the scipt as: "
|
||||
echo "bash run_distributed_pretrain.sh DATA_DIR RANK_TABLE_FILE"
|
||||
echo "for example: bash run_distributed_pretrain.sh /path/dataset /path/hccl.json"
|
||||
echo "bash run_distributed_pretrain_ascend.sh DATA_DIR RANK_TABLE_FILE"
|
||||
echo "for example: bash run_distributed_pretrain_ascend.sh /path/dataset /path/hccl.json"
|
||||
echo "It is better to use absolute path."
|
||||
echo "For hyper parameter, please note that you should customize the scripts:
|
||||
'{CUR_DIR}/scripts/ascend_distributed_launcher/hyper_parameter_config.ini' "
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
echo "=============================================================================================================="
|
||||
echo "Please run the scipt as: "
|
||||
echo "bash run_standalone_pretrain.sh DEVICE_ID EPOCH_SIZE DATA_DIR SCHEMA_DIR"
|
||||
echo "for example: bash run_standalone_pretrain.sh 0 40 /path/zh-wiki/ /path/Schema.json"
|
||||
echo "bash run_standalone_pretrain_ascend.sh DEVICE_ID EPOCH_SIZE DATA_DIR SCHEMA_DIR"
|
||||
echo "for example: bash run_standalone_pretrain_ascend.sh 0 40 /path/zh-wiki/ /path/Schema.json"
|
||||
echo "=============================================================================================================="
|
||||
|
||||
DEVICE_ID=$1
|
||||
|
|
|
@ -542,7 +542,7 @@ class BertAttention(nn.Cell):
|
|||
attention_probs_r = self.reshape(
|
||||
attention_probs_t,
|
||||
(self.from_seq_length,
|
||||
self.batch_num,
|
||||
-1,
|
||||
self.to_seq_length))
|
||||
# value_position_scores is [F, B * N, H]
|
||||
value_position_scores = self.matmul(attention_probs_r,
|
||||
|
@ -550,7 +550,7 @@ class BertAttention(nn.Cell):
|
|||
# value_position_scores_r is [F, B, N, H]
|
||||
value_position_scores_r = self.reshape(value_position_scores,
|
||||
(self.from_seq_length,
|
||||
self.batch_size,
|
||||
-1,
|
||||
self.num_attention_heads,
|
||||
self.size_per_head))
|
||||
# value_position_scores_r_t is [B, N, F, H]
|
||||
|
|
Loading…
Reference in New Issue