diff --git a/official/cv/resnet/README_CN.md b/official/cv/resnet/README_CN.md index 77b3f560efc56a9d94744df9881dad8127cef39e..dcaa4ea345900c0717f773d85e6316c6b3d928e6 100644 --- a/official/cv/resnet/README_CN.md +++ b/official/cv/resnet/README_CN.md @@ -453,16 +453,20 @@ bash run_parameter_server_train_gpu.sh [DATASET_PATH] [CONFIG_PATH] [PRETRAINED_ ```bash # Ascend 鍒嗗竷寮忚缁冩椂鎺ㄧ悊绀轰緥: +cd scripts/ bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) # Ascend 鍗曟満璁粌鏃舵帹鐞嗙ず渚�: -bash run_standalone_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) +cd scripts/ +bash run_standalone_train.sh [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) # GPU 鍒嗗竷寮忚缁冩椂鎺ㄧ悊绀轰緥: -bash run_distribute_train_gpu.sh [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) +cd scripts/ +bash run_distribute_train_gpu.sh [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) # GPU 鍗曟満璁粌鏃舵帹鐞嗙ず渚�: -bash run_standalone_train_gpu.sh [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) +cd scripts/ +bash run_standalone_train_gpu.sh [DATASET_PATH] [CONFIG_PATH] [RUN_EVAL](optional) [EVAL_DATASET_PATH](optional) ``` 璁粌鏃舵帹鐞嗛渶瑕佸湪璁剧疆`RUN_EVAL`涓篢rue锛屼笌姝ゅ悓鏃惰繕闇€瑕佽缃甡EVAL_DATASET_PATH`銆傛澶栵紝褰撹缃甡RUN_EVAL`涓篢rue鏃惰繕鍙负python鑴氭湰璁剧疆`save_best_ckpt`, `eval_start_epoch`, `eval_interval`绛夊弬鏁般€� diff --git a/research/cv/RCAN/src/rcan_model.py b/research/cv/RCAN/src/rcan_model.py index 0fd5020768cfc18ef43945bcb4557f2fb31270f7..6ffbf6680aa9513e1485e2715fbf3f1a77332b02 100644 --- a/research/cv/RCAN/src/rcan_model.py +++ b/research/cv/RCAN/src/rcan_model.py @@ -86,11 +86,12 @@ class Upsampler(nn.Cell): """rcan""" super(Upsampler, self).__init__() m = [] - if (scale & (scale - 1)) == 0: - for _ in range(int(math.log(scale, 2))): - m.append(SmallUpSampler(conv, 2, n_feats, has_bias=has_bias)) - elif scale == 3: - m.append(SmallUpSampler(conv, 3, n_feats, has_bias=has_bias)) + for s in scale: + if (s & (s - 1)) == 0: + for _ in range(int(math.log(s, 2))): + m.append(SmallUpSampler(conv, 2, n_feats, has_bias=has_bias)) + elif s == 3: + m.append(SmallUpSampler(conv, 3, n_feats, has_bias=has_bias)) self.net = nn.SequentialCell(m) def construct(self, x):