1. 矩阵维度变换
1.1 numpy.reshape(a, newshape, order=’C’)
reshape() 函数经常用做一维数组维度的变化,也就是将一维数组变化成为指定维度的矩阵。order 是指不同的索引规则,一般默认 C,按照行进行运算。
示例:
1 | print np.reshape(np.arange(10), (2, 5)) |
一个专注技术的组织
不同的索引方式是 faiss 的核心内容, 他们以不同的方式构建, 基于不同的算法与数据结构. 选择合适的 index 来处理数据是使用 faiss 最基础的一步. 官方 wiki 上也有帮助你如何选择不同的 index, 参见 Guidelines to choose an index
这次来学习 faiss 三个最基础的 index. 分别是 IndexFlatL2, IndexIVFFlat, IndexIVFPQ
!pip install kashgari-tf —user
!pip install tensorflow==1.14.0 —user
golang 微服务技术栈:
gin—api 接口框架 https://github.com/gin-gonic/gin
gorm —持久化框架 https://gorm.io/
ffm+faiss 千万级别的 item 召回性能问题,使用阿里巴巴 深度树匹配模型(TDM)做聚类。