Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Last login: Sun Apr 26 14:30:29 on ttys000
- Daniels-MacBook-Pro:~ danielmxli$ ls
- Desktop Documents Library Music Public
- Development Downloads Movies Pictures
- Daniels-MacBook-Pro:~ danielmxli$ ssh cs61c-ev@star.cs.berkeley.edu
- ssh: connect to host star.cs.berkeley.edu port 22: Network is unreachable
- Daniels-MacBook-Pro:~ danielmxli$ ssh cs61c-ev@star.eecs.berkeley.edu
- ssh: Could not resolve hostname star.eecs.berkeley.edu: nodename nor servname provided, or not known
- Daniels-MacBook-Pro:~ danielmxli$ ssh cs61c-ev@star.berkeley.edu
- The authenticity of host 'star.berkeley.edu (128.32.25.86)' can't be established.
- RSA key fingerprint is 1f:68:69:a3:15:24:99:51:01:4a:ff:a8:ec:79:67:ec.
- Are you sure you want to continue connecting (yes/no)? yes
- Warning: Permanently added 'star.berkeley.edu,128.32.25.86' (RSA) to the list of known hosts.
- Password:
- Password:
- Password:
- Daniels-MacBook-Pro:~ danielmxli$
- Daniels-MacBook-Pro:~ danielmxli$ ssh cs61-ev@hive25.cs.berkeley.edu
- cs61-ev@hive25.cs.berkeley.edu's password:
- Permission denied, please try again.
- cs61-ev@hive25.cs.berkeley.edu's password:
- Permission denied, please try again.
- cs61-ev@hive25.cs.berkeley.edu's password:
- Permission denied (publickey,password).
- Daniels-MacBook-Pro:~ danielmxli$ ssh cs61-ev@hive25.cs.berkeley.edu
- cs61-ev@hive25.cs.berkeley.edu's password:
- Permission denied, please try again.
- cs61-ev@hive25.cs.berkeley.edu's password:
- Daniels-MacBook-Pro:~ danielmxli$
- Daniels-MacBook-Pro:~ danielmxli$ ssh cs61c-ev@hive25.cs.berkeley.edu
- cs61c-ev@hive25.cs.berkeley.edu's password:
- ----------------------------------------------------------------------
- Instructional Support Group (ISG), EECS email:inst@eecs.berkeley.edu
- Ubuntu 14.04.1 LTS 3.13.0-45-generic.efi.signed
- Host: hive25 SystemBuiltOn: 23Jan15-06:40
- ----------------------------------------------------------------------
- Last login: Sun Apr 26 15:01:14 2015 from c-24-130-80-223.hsd1.ca.comcast.net
- 'cs61c-ev' is using 1178/2048 MB (57%) of its disk quota on /home/cc.
- 'cs61c-ev' is using 0/20971 MB (0%) of its disk quota on /home/tmp.
- (Type 'more /share/b/pub/disk.quotas' for more information.)
- (15:15:31 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~ $ ssh star
- ssh: connect to host star port 22: No route to host
- (15:15:34 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~ $ ls
- cpu.circ lab11 proj2-ev-qb
- Desktop labs proj3-ev-qb
- Documents Library proj4-ev-qb
- Downloads linuxmint-17.1-cinnamon-64bit.iso Public
- files_for_submit logisim-generic-2.7.1.jar Templates
- hs_err_pid17501.log mozilla.pdf Videos
- hw5 Music work
- lab10 Pictures
- (15:15:38 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~ $ proj4-ev-qb/^C
- (15:15:40 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~ $ cd proj4-ev-qb/
- (15:15:42 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ ls
- Makefile matrix-linear.log spark-cnn.log specs
- Makefrag-matrix matrix-nn.log spark-linear.log test
- Makefrag-spark matrix.py spark.log test-linear.log
- Makefrag-test snapshot spark-nn.log test.py
- matrix spark spark.py util
- (15:15:43 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ ls
- Makefile Makefrag-spark matrix matrix-nn.log snapshot spark-cnn.log spark.log spark.py test test.py
- Makefrag-matrix Makefrag-test matrix-linear.log matrix.py spark spark-linear.log spark-nn.log specs test-linear.log util
- (15:15:52 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix
- matrix/ matrix-linear.log matrix-nn.log matrix.py
- (15:15:52 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix
- matrix/ matrix-linear.log matrix-nn.log matrix.py
- (15:15:52 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix
- matrix/ matrix-linear.log matrix-nn.log matrix.py
- (15:15:52 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix/linear.py
- linear.py linear.pyc
- (15:15:52 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix/linear.py
- (15:20:00 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ ls
- Makefile Makefrag-spark matrix matrix-nn.log snapshot spark-cnn.log spark.log spark.py test test.py
- Makefrag-matrix Makefrag-test matrix-linear.log matrix.py spark spark-linear.log spark-nn.log specs test-linear.log util
- (15:20:03 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ cd util
- (15:20:06 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb/util $ ls
- build dump.py dump.pyc im2col.c im2col_c.c im2col_c.pyx im2col_c.so im2col.h im2col.py __init__.py __init__.pyc layers.py layers.pyc setup.py util.py util.pyc
- (15:20:06 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb/util $ vim layers.py
- (15:20:37 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb/util $ vim matc^C
- (15:20:42 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb/util $ cd ..
- (15:20:43 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix
- matrix/ matrix-linear.log matrix-nn.log matrix.py
- (15:20:43 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix
- matrix/ matrix-linear.log matrix-nn.log matrix.py
- (15:20:43 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix/
- classifier.py cnn.py .gitignore __init__.pyc linear.pyc nn.py
- classifier.pyc cnn.pyc __init__.py linear.py .linear.py.swp nn.pyc
- (15:20:43 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix/linear.py
- (15:24:48 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim util/
- build/ dump.pyc im2col.c im2col_c.pyx im2col.py __init__.pyc layers.pyc util.py
- dump.py .gitignore im2col_c.c im2col.h __init__.py layers.py setup.py util.pyc
- (15:24:48 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim util/layers.py
- (15:25:06 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix/linear.py
- (15:34:43 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim matrix/linear.py
- (15:37:58 Sun Apr 26 2015 cs61c-ev@hive25 Linux x86_64)
- ~/proj4-ev-qb $ vim util/layers.py
- df[g_ <= 0] = 0
- return df.reshape(g.shape)
- def softmax_loss(f, Y):
- """
- * Coumputes the loss and its gradient for softmax classification
- Input:
- - f: [N * K] -> scores of N images for K classes
- - Y: [N * 1] -> labels of N images (range(0, K))
- Output:
- - L: softmax loss
- - df: gradient of L on f
- """
- N = f.shape[0]
- # probs: [p_nk = exp(f_k_n) / sum(exp(f_j_n))]: [N * K]
- p = np.exp(f - np.max(f, axis=1, keepdims=True))
- p /= np.sum(p, axis=1, keepdims=True)
- # loss: sum_n(-log(p_ny)) / N, where p_ny = prob of the image n's label
- L = np.sum(-np.log(p[np.arange(N), Y])) / N
- # dL_n/df_k = p_k - delta_Y_n_k, where delta_Y_n_k = if (Y[n] == k) 1 else 0
- # gradient of L on f: dL/df = [dL_n/df_k / N]: [N * K]
- df = p.copy()
- df[np.arange(N), Y] -= 1
- df /= N
- return L, df
- def conv_forward(X, A, b, S, P):
- """
- Input:
- - X: [N * D * H * W] -> N image data of size D * H * W
- - A: [K * D * F * F] -> K filters of size D * F * F
- - b: [K * 1] -> bias
- - S: stride of convolution (integer)
- - P: size of zero padding (integer)
- Output:
- - f: [N * K * H_ * W_] -> activation maps, where
- - H_ = (H - F + 2P)/S + 1
- - W_ = (W - F + 2P)/S + 1
- - X_col: [(D * F * F) * (H_ * W_ * N)] -> column stretched images
- """
- 95,5 37%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement