【ML15】浅谈神经网络 Nerual Network
Neural 神经元 与 神经网络
首先看一个人类神经元模拟图:
尝试将其中的一个 神经元(Nerual) 结构提取出来,简化:
其中输入为
x
x
x 向量,包含
[
x
1
,
x
2
,
x
3
,
x
4
]
[x_1, x_2, x_3, x_4]
[x1,x2,x3,x4] 四个特征输入,输出
y
y
y 为包含
[
y
1
,
y
2
]
[y_1, y_2]
[y1,y2] 的向量。
上图只是一个简单的神经元,若想通过简单的神经元构造复杂的神经网络,即:
python & Tensorflow 构建神经网络
按照两种方式构建神经网络:
方式一:不通过 Tensorflow 构建神经网络
x = np.array([[200.0, 17.0]])
layer_1 = Dense(units=3, activation="sigmoid")
a1 = layer_1(x)
layer_2 = Dense(units=1, activation="sigmoid")
a2 = layer_2(a1)
方式二:通过 Tensorflow 构建神经网络
model = Sequential([
Dense(units=3, activation="sigmoid", name='layer_1'),
Dense(units=1, activation="sigmoid", name='layer_2')])
或
layer_1 = Dense(units=3, activation="sigmoid")
layer_2 = Dense(units=1, activation="sigmoid")
model = Sequential([layer_1, layer_2])
moreDeep
对于一个layer的举例。
—> end
浅谈到此为止,【ML15】将以一个实际项目的方式将神经网络阐述出来,有兴趣可以了解一下。
【ML15】Make a coffee for Andrew Ng
大概 2022年10月10日出。