Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- """
- Created on Thu Aug 16 14:04:15 2018
- @author: apple
- """
- import numpy as np
- D = 784 # 数据维度
- K = 10 # 类别数
- N = 128 # 样本数量
- X = np.random.randn(N, D) # 数据矩阵,每行一个样本
- W = 0.01 * np.random.randn(D,K)
- b = np.zeros((1,K))
- scores = np.dot(X, W) + b # 广播机制
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement