
tensorflow
Tramac
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Tensorflow中张量数据类型的转换
字符串转为数字: tf.string_to_number (string_tensor, out_type=None, name=None)转为64位浮点类型–float64: tf.to_double(x, name=’ToDouble’)转为32位浮点类型–float32: tf.to_float(x, name=’ToFloat’)转为32位整型–int32: tf.to_int32(x, n原创 2017-07-11 11:15:15 · 33194 阅读 · 0 评论 -
数据预处理之Normalize
import numpy as np from sklearn.preprocessing import normalizex = np.random.rand(1000)*10 norm1 = x / np.linalg.norm(x) norm2 = normalize(x[:,np.newaxis], axis=0).ravel() print np.all(norm1 == norm2) #原创 2017-09-20 10:02:12 · 2157 阅读 · 0 评论