You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by jo...@apache.org on 2021/01/15 09:12:36 UTC

[singa] branch dev updated: fix LSTM alert and bug

This is an automated email from the ASF dual-hosted git repository.

joddiyzhang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/singa.git


The following commit(s) were added to refs/heads/dev by this push:
     new ba515cd  fix LSTM alert and bug
     new 6155357  Merge pull request #828 from chrishkchris/LSTM20210115
ba515cd is described below

commit ba515cd59c85b497b509958d8f45ad31c073090e
Author: Chris Yeung <ch...@yahoo.com.hk>
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)