LudoArt Blog

The programmer of tomorrow is the magician of the future.

C++ Study Week Two

第二周 一、 类和对象的基本概念(2) 1.1 类的成员函数和类的定义分开写 // 矩形类 class CRectangle { public: int w, h; int Area(); // 成员函数仅在此处声明 int Perimeter(); void Init(int w_, int h_);...

C++ Study Week Three

第三周 一、this指针 非静态成员函数中可以直接使用this来代表指向该函数作用的对象的指针。 class A{ int i; public: void Hello(){ cout << "hello" << endl; } }; int main(){ A * p = NULL; p ...

C++ Study Week One

第一周 一、 引用 1.1 引用的概念 int n =4; int & r = n; // r引用了n,r的类型是int & 某个变量的引用,等价于这个变量,相当于该变量的一个别名 int n = 7; int & r = n; r = 4; cout << r; // 4 cout << n; //...

Tensorflow Turtorial

Building a neural network in tensorflow

1 探索Tensorflow库 首先,导入所需的库,如下: import math import numpy as np import h5py import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.python.framework import ops from tf_u...

Optimization Methos

1 导入所需的包 import numpy as np import matplotlib.pyplot as plt import scipy.io import math import sklearn import sklearn.datasets from opt_utils import load_params_and_grads, initialize...

Improving Deep Neural Networks Part Two

Regularization

改进深度神经网络之二:正则化 1 导入所需的包和数据集 # import packages import numpy as np import matplotlib.pyplot as plt from reg_utils import sigmoid, relu, plot_decision_boundary, initialize_parameters, l...

Improving Deep Neural Networks Part Three

Gradient Checking

改进深度神经网络之三:梯度校验 1 导入所需的包 # Packages import numpy as np from testCases import * from gc_utils import sigmoid, relu, dictionary_to_vector, vector_to_dictionary, gradients_to_vector 2...

Improving Deep Neural Networks Part One

Initialization

改进深度神经网络之一:初始化 1 导入所需的包和数据集 import numpy as np import matplotlib.pyplot as plt import sklearn import sklearn.datasets from init_utils import sigmoid, relu, compute_loss, forward_prop...

Deep Neural Network for Image Classification Application

1 导入所需的包 import time import numpy as np import h5py import matplotlib.pyplot as plt import scipy from PIL import Image from scipy import ndimage from dnn_app_utils_v2 import * plt.rc...

Building your Deep Neural Network Step by Step

1 导入所需的包 import numpy as np import h5py import matplotlib.pyplot as plt from testCases_v2 import * from dnn_utils_v2 import sigmoid, sigmoid_backward, relu, relu_backward %matplotlib...