!6384 alexnet dataset seed

Merge pull request !6384 from chenweifeng/alexnet_seed
This commit is contained in:
mindspore-ci-bot 2020-09-19 14:54:58 +08:00 committed by Gitee
commit 5bd3d1e529
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ from src.alexnet import AlexNet
from src.get_param_groups import get_param_groups
import mindspore.nn as nn
from mindspore.communication.management import init, get_rank
from mindspore import dataset as de
from mindspore import context
from mindspore import Tensor
from mindspore.train import Model
@ -37,6 +38,7 @@ from mindspore.train.callback import ModelCheckpoint, CheckpointConfig, LossMoni
from mindspore.common import set_seed
set_seed(1)
de.config.set_seed(1)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='MindSpore AlexNet Example')