-
Notifications
You must be signed in to change notification settings - Fork 0
/
test
130 lines (116 loc) · 9.45 KB
/
test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
(tensorflow) D:\codes\ai\text-classification-cnn-rnn-master>python run_cnn.py test
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synon
ym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synon
ym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synon
ym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synon
ym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synon
ym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synon
ym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as
a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as
a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as
a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as
a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as
a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as
a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Configuring CNN model...
WARNING:tensorflow:From D:\codes\ai\text-classification-cnn-rnn-master\cnn_model.py:35: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From D:\codes\ai\text-classification-cnn-rnn-master\cnn_model.py:45: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.
WARNING:tensorflow:From D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\ops\init_ops.py:1251: calling VarianceScaling.__init__
(from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From D:\codes\ai\text-classification-cnn-rnn-master\cnn_model.py:50: conv1d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a futu
re version.
Instructions for updating:
Use `tf.keras.layers.Conv1D` instead.
WARNING:tensorflow:From D:\codes\ai\text-classification-cnn-rnn-master\cnn_model.py:56: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version
.
Instructions for updating:
Use keras.layers.dense instead.
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
* https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
* https://github.com/tensorflow/addons
* https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.
WARNING:tensorflow:From D:\codes\ai\text-classification-cnn-rnn-master\cnn_model.py:66: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be
removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See `tf.nn.softmax_cross_entropy_with_logits_v2`.
WARNING:tensorflow:From D:\codes\ai\text-classification-cnn-rnn-master\cnn_model.py:69: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer inste
ad.
Loading test data...
WARNING:tensorflow:From run_cnn.py:147: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2020-01-11 08:57:04.492485: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:From run_cnn.py:148: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.
WARNING:tensorflow:From run_cnn.py:149: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
WARNING:tensorflow:From D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\saver.py:1276: checkpoint_exists (from tensorf
low.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
Testing...
Test Loss: 0.19, Test Acc: 95.03%
Precision, Recall and F1-Score...
D:\Users\hello\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\sklearn\metrics\classification.py:1439: UndefinedMetricWarning: Recall and F-score are ill-define
d and being set to 0.0 in labels with no true samples.
'recall', 'true', average, warn_for)
precision recall f1-score support
体育 0.99 0.99 0.99 1000
财经 0.91 0.92 0.91 1000
房产 1.00 1.00 1.00 1000
家居 0.95 0.96 0.96 1000
教育 0.96 0.87 0.91 1000
科技 0.95 0.91 0.93 1000
时尚 0.97 0.96 0.96 1000
时政 0.92 0.94 0.93 1000
游戏 0.97 0.98 0.97 1000
娱乐 0.95 0.98 0.96 1000
股票 0.95 0.93 0.94 1000
社会 0.87 0.94 0.90 1000
星座 0.00 0.00 0.00 0
彩票 0.99 0.98 0.98 1000
accuracy 0.95 13000
macro avg 0.88 0.88 0.88 13000
weighted avg 0.95 0.95 0.95 13000
Confusion Matrix...
[[990 0 0 0 1 3 1 0 0 3 0 2 0 0]
[ 1 922 0 4 4 4 1 14 2 2 37 6 2 1]
[ 0 0 996 2 0 0 0 1 0 0 0 1 0 0]
[ 0 5 1 961 2 5 6 2 0 6 0 11 1 0]
[ 3 12 0 11 870 17 7 12 12 14 4 33 5 0]
[ 0 5 0 8 10 913 2 18 9 5 0 29 1 0]
[ 0 2 0 14 4 1 958 0 2 9 0 4 5 1]
[ 0 11 0 2 6 3 0 941 3 4 2 26 0 2]
[ 0 2 1 1 0 1 3 1 980 5 0 5 1 0]
[ 1 0 0 1 0 1 7 2 3 979 0 6 0 0]
[ 0 51 0 1 0 4 1 12 0 0 928 3 0 0]
[ 0 5 0 3 10 11 1 16 1 7 1 937 1 7]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 1 1 0 0 0 1 0 3 2 1 0 12 0 979]]
Time usage: 0:00:13