forked from mindspore-Ecosystem/mindspore
fix issues on modelzoo
This commit is contained in:
parent
06e86e34de
commit
e2a18ea1c3
|
@ -115,7 +115,7 @@ class DenoisingDataset:
|
|||
batch_x = self.xs[index, ...]
|
||||
noise = np.random.standard_normal(size=batch_x.shape) * (self.sigma/255.0)
|
||||
batch_y = batch_x + noise
|
||||
return batch_y, noise
|
||||
return batch_y.astype(np.float32), noise.astype(np.float32)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.xs)
|
||||
|
|
|
@ -21,6 +21,7 @@ ulimit -u unlimited
|
|||
export DEVICE_NUM=8
|
||||
export RANK_SIZE=8
|
||||
export RANK_TABLE_FILE=$PATH1
|
||||
export HCCL_CONNECT_TIMEOUT=1200
|
||||
|
||||
for ((i = 0; i < ${DEVICE_NUM}; i++)); do
|
||||
let deviceID=$i
|
||||
|
@ -37,4 +38,4 @@ for ((i = 0; i < ${DEVICE_NUM}; i++)); do
|
|||
env >env.log
|
||||
python -u train.py --run_distribute=True --dataset_path=$PATH2 > log.txt 2>&1 &
|
||||
cd ..
|
||||
done
|
||||
done
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
# limitations under the License.
|
||||
# ============================================================================
|
||||
|
||||
python eval.py --data_url ./data/ --ckpt ./SST-2.ckpt
|
||||
python eval.py --data_url ./data/ --ckpt ./SST-2.ckpt &> eval.log &
|
||||
|
|
|
@ -95,7 +95,7 @@ function infer()
|
|||
|
||||
function cal_acc()
|
||||
{
|
||||
python3.7 ../postprocess.py --result_dir=./result_files --label_dir=./preprocess_result/03_data &> acc.log
|
||||
python3.7 ../postprocess.py --result_dir=./result_files --label_dir=./preprocess_result/03_data &> acc.log &
|
||||
}
|
||||
|
||||
if [ $need_preprocess == "y" ]; then
|
||||
|
@ -119,4 +119,4 @@ cal_acc
|
|||
if [ $? -ne 0 ]; then
|
||||
echo "calculate accuracy failed"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ============================================================================
|
||||
python train.py --data_url ./data/ --train_url ./output/
|
||||
python train.py --data_url ./data/ --train_url ./output/ &> train.log &
|
||||
|
|
Loading…
Reference in New Issue