This is an automated email from the ASF dual-hosted git repository. chrishkchris pushed a commit to branch LSTM20210115 in repository https://gitbox.apache.org/repos/asf/singa.git
commit ba515cd59c85b497b509958d8f45ad31c073090e Author: Chris Yeung <[email protected]> AuthorDate: Fri Jan 15 17:06:04 2021 +0800 fix LSTM alert and bug --- examples/largedataset_cnn/process_data.py | 2 -- examples/largedataset_cnn/train_largedata.py | 1 - 2 files changed, 3 deletions(-) diff --git a/examples/largedataset_cnn/process_data.py b/examples/largedataset_cnn/process_data.py index 0dd3c03..e25e892 100644 --- a/examples/largedataset_cnn/process_data.py +++ b/examples/largedataset_cnn/process_data.py @@ -1,6 +1,5 @@ import os import imghdr -import pickle as pkl import numpy as np from PIL import Image @@ -23,7 +22,6 @@ def process_data(dataset_root, classes): with open(classes, 'r', encoding='utf-8') as f: classes = f.readlines() classes = list(map(lambda x: x.strip(), classes)) - num_classes = len(classes) # make input_paths and labels input_paths, labels = [], [] diff --git a/examples/largedataset_cnn/train_largedata.py b/examples/largedataset_cnn/train_largedata.py index dad4670..537aabd 100644 --- a/examples/largedataset_cnn/train_largedata.py +++ b/examples/largedataset_cnn/train_largedata.py @@ -165,7 +165,6 @@ def run(global_rank, idx = np.arange(train_x.shape[0], dtype=np.int32) # attached model to graph - model.on_device(dev) model.set_optimizer(sgd) model.compile([tx], is_train=True, use_graph=graph, sequential=sequential) dev.SetVerbosity(verbosity)
