Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kk7nc committed Mar 27, 2018
1 parent 08999df commit b0355d3
Show file tree
Hide file tree
Showing 26 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Examples/CIFAR.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
from sklearn.datasets import fetch_olivetti_faces
from sklearn.model_selection import train_test_split
import src.RMDL_Image as RMDL
from RMDL import RMDL_Image as RMDL

if __name__ == "__main__":
number_of_classes = 40
Expand Down
4 changes: 2 additions & 2 deletions Examples/IMDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
os.environ['KERAS_BACKEND'] = 'tensorflow'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
import src.text_feature_extraction as txt
from RMDL import text_feature_extraction as txt
from keras.datasets import imdb
import numpy as np
import src.RMDL_Text as RMDL
from RMDL import RMDL_Text as RMDL

if __name__ == "__main__":
print("Load IMDB dataset....")
Expand Down
2 changes: 1 addition & 1 deletion Examples/LFW.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from sklearn.datasets import fetch_lfw_people
from sklearn.model_selection import train_test_split
import numpy as np
import src.RMDL_Image as RMDL
from RMDL import RMDL_Image as RMDL

if __name__ == "__main__":

Expand Down
2 changes: 1 addition & 1 deletion Examples/MNIST.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
from keras.datasets import mnist
import numpy as np
import src.RMDL_Image as RMDL
from RMDL import RMDL_Image as RMDL

if __name__ == "__main__":
(X_train, y_train), (X_test, y_test) = mnist.load_data()
Expand Down
2 changes: 1 addition & 1 deletion Examples/ORL.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
from sklearn.datasets import fetch_olivetti_faces
from sklearn.model_selection import train_test_split
import RMDL_Image as RMDL
from RMDL import RMDL_Image as RMDL

if __name__ == "__main__":
number_of_classes = 40
Expand Down
2 changes: 1 addition & 1 deletion Examples/Reuters-21578.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from nltk.corpus import reuters
from sklearn.preprocessing import MultiLabelBinarizer
import numpy as np
import src.RMDL_Text as RMDL
from RMDL import RMDL_Text as RMDL

if __name__ == "__main__":
print("Load Reuters dataset....")
Expand Down
4 changes: 2 additions & 2 deletions Examples/Text_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
os.environ['KERAS_BACKEND'] = 'tensorflow'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
os.environ["CUDA_VISIBLE_DEVICES"]="0,2,1"
import src.RMDL_Text as RMDL
from RMDL import RMDL_Text as RMDL
import sys
sys.path.append('../Download_datasets')
from sklearn.cross_validation import train_test_split, cross_val_score
import src.text_feature_extraction as txt
from RMDL import text_feature_extraction as txt
import numpy as np
import pandas as pd

Expand Down
7 changes: 3 additions & 4 deletions Examples/WOS-11967.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

import sys
sys.path.append('../src')
sys.path.append('../Download_datasets')
import os
os.environ['KERAS_BACKEND'] = 'tensorflow'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
import src.text_feature_extraction as txt
from RMDL import text_feature_extraction as txt
from sklearn.model_selection import train_test_split
import Download.Download_WOS as WOS
from Download import Download_WOS as WOS
import numpy as np
import src.RMDL_Text as RMDL
from RMDL import RMDL_Text as RMDL

if __name__ == "__main__":
path_WOS = WOS.download_and_extract()
Expand Down
6 changes: 3 additions & 3 deletions Examples/WOS-46985.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
os.environ['KERAS_BACKEND'] = 'tensorflow'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
import src.text_feature_extraction as txt
from RMDL import text_feature_extraction as txt
from sklearn.model_selection import train_test_split
import Download.Download_WOS as WOS
from Download import Download_WOS as WOS
import numpy as np
import src.RMDL_Text as RMDL
from RMDL import RMDL_Text as RMDL

if __name__ == "__main__":
path_WOS = WOS.download_and_extract()
Expand Down
6 changes: 3 additions & 3 deletions Examples/WOS-5736.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
os.environ['KERAS_BACKEND'] = 'tensorflow'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
import src.text_feature_extraction as txt
import Download.Download_WOS as WOS
import src.RMDL_Text as RMDL
from RMDL import text_feature_extraction as txt
from Download import Download_WOS as WOS
from RMDL import RMDL_Text as RMDL
import sys
sys.path.append('../Download_datasets')
from sklearn.cross_validation import train_test_split
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Global.py → RMDL/Global.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import os.path
global GloVe_DIR
from pathlib import Path
import Download.Download_Glove as GloVe
from Download import Download_Glove as GloVe


GloVe_DIR = GloVe.download_and_extract(data='Twitter')
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/RMDL_Image.py → RMDL/RMDL_Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
os.environ["CUDA_VISIBLE_DEVICES"]="2,1,0"
from sklearn.metrics import accuracy_score
import numpy as np
import src.Plot as Plot
from RMDL import Plot as Plot
import gc
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
import collections
from sklearn.metrics import f1_score
import src.BuildModel as BuildModel
import src.Global as G
from RMDL import BuildModel as BuildModel
from RMDL import Global as G
from keras.callbacks import ModelCheckpoint
np.random.seed(7)

Expand Down
8 changes: 4 additions & 4 deletions src/RMDL_Text.py → RMDL/RMDL_Text.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
from sklearn.metrics import accuracy_score
import gc
from sklearn.metrics import confusion_matrix
import src.Plot as Plot
from RMDL import Plot as Plot
import numpy as np
import src.Global as G
from RMDL import Global as G
import collections
from sklearn.metrics import precision_recall_fscore_support
import src.BuildModel as BuildModel
import src.text_feature_extraction as txt
from RMDL import BuildModel as BuildModel
from RMDL import text_feature_extraction as txt
from keras.callbacks import ModelCheckpoint
np.random.seed(7)

Expand Down
File renamed without changes.
Binary file added RMDL/__pycache__/Global.cpython-35.pyc
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
import numpy as np
import os
from nltk import word_tokenize
from nltk.corpus import stopwords
import re
from nltk.stem import PorterStemmer, WordNetLemmatizer
import src.Global as G
from RMDL import Global as G

cachedStopWords = stopwords.words("english")

Expand Down
Binary file removed src/__pycache__/Global.cpython-35.pyc
Binary file not shown.
Binary file not shown.

0 comments on commit b0355d3

Please sign in to comment.