forked from huawei/mindspore2022
bnfold update
This commit is contained in:
parent
71b522ec09
commit
e6a4b0ed8a
|
|
@ -28,11 +28,11 @@ batch_norm_op_info = TBERegOp("BatchNormFoldD") \
|
|||
.compute_cost(10) \
|
||||
.kernel_name("batchnorm_fold") \
|
||||
.partial_flag(True) \
|
||||
.attr("momentum", "optional", "float", "all") \
|
||||
.attr("epsilon", "optional", "float", "all") \
|
||||
.attr("is_training", "optional", "bool", "all") \
|
||||
.attr("freeze_bn", "optional", "int", "all") \
|
||||
.attr("format", "optional", "str", "all") \
|
||||
.attr("momentum", "optional", "float", "all", "0.9") \
|
||||
.attr("epsilon", "optional", "float", "all", "0.00001") \
|
||||
.attr("is_training", "optional", "bool", "all", "true") \
|
||||
.attr("freeze_bn", "optional", "int", "all", "0") \
|
||||
.attr("format", "optional", "str", "all", "NCHW") \
|
||||
.input(0, "x", False, "required", "all") \
|
||||
.input(1, "x_sum", False, "required", "all") \
|
||||
.input(2, "x_square_sum", False, "required", "all") \
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ from src.yolo_dataset import create_yolo_dataset
|
|||
from src.config import ConfigYOLOV3DarkNet53
|
||||
|
||||
devid = int(os.getenv('DEVICE_ID'))
|
||||
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=True, device_id=devid)
|
||||
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False, device_id=devid)
|
||||
|
||||
|
||||
class Redirct:
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ set_seed(1)
|
|||
|
||||
devid = int(os.getenv('DEVICE_ID'))
|
||||
context.set_context(mode=context.GRAPH_MODE, enable_auto_mixed_precision=True,
|
||||
device_target="Ascend", save_graphs=True, device_id=devid)
|
||||
device_target="Ascend", save_graphs=False, device_id=devid)
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
|
|
|||
Loading…
Reference in New Issue