This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Frog: [[[0.23137254901960785, 0.24313725490196078, 0.24705882352941178], [0.16862745098039217, 0.18039215686274507, 0.1764705882352941], [0.19607843137254902, 0.18823529411764706, 0.16862745098039217], [0.26666666666666666, 0.21176470588235294, 0.1647058823529412], [0.3843137254901961, 0.28627450980392155, 0.20392156862745098], [0.4666666666666667, 0.3568627450980392, 0.24705882352941178], [0.5450980392156862, 0.4196078431372549, 0.29411764705882354], [0.5686274509803921, 0.43137254901960786, 0.3137254901960784], [0.5843137254901961, 0.4588235294117647, 0.34901960784313724], [0.5843137254901961, 0.47058823529411764, 0.36470588235294116], [0.5137254901960784, 0.403921568627451, 0.30196078431372547], [0.49019607843137253, 0.38823529411764707, 0.2980392156862745], [0.5568627450980392, 0.45098039215686275, 0.3568627450980392], [0.5647058823529412, 0.4392156862745098, 0.33725490196078434], [0.5372549019607843, 0.4117647058823529, 0.30980392156862746], [0.5058823529411764, 0.3803921568627451, 0.2784313725490196], [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| B1:[-1.526787794440281e-12, 2.5593275423978253e-11, -7.933900005110362e-13, 6.912213183905846e-12, 3.4158142708208483e-12, -5.302215417986998e-12, -3.940839522430512e-11, 5.601949279097138e-12, 6.059488256140292e-12, 1.2729296451654576e-11, -2.242993402090489e-12, -2.152980933435733e-12, -1.0890569672870463e-11, 6.5211631388025714e-12, -1.1462381050466371e-11, 1.9558842930352128e-12] | |
| B2:[-2.1183288382665742e-13, -3.414346540424672e-14, -9.615830865479912e-14, 7.549096578709037e-13, -3.626362079200702e-14, 2.188527821170726e-18, -4.540578726128621e-13, 3.348260170611118e-13, 8.282698764445765e-14, 6.119610064433554e-15, -1.1303759645566403e-13, 1.8436110590788725e-13, 2.469308283155262e-13, -1.5789101207134008e-13, 4.5053094646779156e-13, 2.8786924548568895e-13] | |
| B3:[1.1275819593958992e-13, -9.81989650217869e-14, -8.436599400880492e-14, 1.3567463925421803e-13, -1.5857129364837595e-13, 3.4242661343003727e-13, 4.8308830422491504e-14, -5.695482203573613e-14] | |
| B4:[-0.020290048805014827, -0.40347595093696037, -0.3989 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def shape(x): | |
| return (len(x), len(x[0]), len(x[0][0]), len(x[0][0][0])) | |
| def conv_forward(x,weight,b,parameters): | |
| pad = parameters['pad'] | |
| stride = parameters['stride'] | |
| (m, n_h, n_w, n_C_prev) = shape(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def conv_forward_naive(x,weight,b,parameters): | |
| pad = parameters['pad'] | |
| stride = parameters['stride'] | |
| (m, n_h, n_w, n_C_prev) = (len(x), len(x[0]), len(x[0][0]), len(x[0][0][0])) | |
| (f,f, n_C_prev, n_C) = (len(weight), len(weight[0]), len(weight[0][0]), len(weight[0][0][0])) | |
| n_H = int(1 + (n_h + 2 * pad - f) / stride) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| void convertToBinary(unsigned int n, char ** representation, int littleEndian){ | |
| int spot = 0; | |
| int c; | |
| if (littleEndian) | |
| c = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class GradeSchool { | |
| public static void main(String[] args){ | |
| // Test add | |
| int[] a = new int[] {9,4,3,2}; | |
| int[] b = new int[] {3,1,8,5}; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gym | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import copy | |
| #Hyperparameters | |
| NUM_EPISODES = 10000 | |
| LEARNING_RATE = 0.000025 | |
| GAMMA = 0.99 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gym | |
| import numpy as np | |
| import sklearn.pipeline | |
| from sklearn.kernel_approximation import RBFSampler | |
| import matplotlib.pyplot as plt | |
| import copy | |
| #Hyperparameters | |
| NUM_EPISODES = 10000 | |
| LEARNING_RATE = 0.000025 |