演算法›Ch3 動態規劃
第 27 題/共 40 題
◀ AL 27/40
27. Matrix Chain Multiplication、Dynamic Programming、神經網路
#AL-03-027中Matrix Chain MultiplicationDynamic Programming神經網路

(10%) Consider a neural network with nn layers of fully connected layers, where the first layer is the input layer, the nnth layer is the output layer, and the rest are hidden layers. The iith layer has PiP_i neurons, where 1≤i≤n1 \le i \le n. Each neuron in the iith layer is connected to every neuron in the (i+1)(i+1)th layer, where 1≤i<n1 \le i < n. Let wj,kiw_{j,k}^{i} represent the weight of the connection from the jjth neuron in the iith layer to the kkth neuron in the (i+1)(i+1)th layer. Let [v1i v2i ⋯ vPii]T[v_1^i\ v_2^i\ \cdots\ v_{P_i}^i]^T be the values of neurons in the iith layer, where 1≤i≤n1 \le i \le n. Then, we can obtain vki+1=∑j=1Piwj,kivjiv_k^{i+1} = \sum_{j=1}^{P_i} w_{j,k}^{i} v_j^{i}, where 1≤k≤Pi+11 \le k \le P_{i+1}.

Given that ⟨P1,P2,P3,P4,P5,P6⟩=⟨10,6,12,5,50,3⟩\langle P_1, P_2, P_3, P_4, P_5, P_6 \rangle = \langle 10, 6, 12, 5, 50, 3 \rangle, we want to achieve the result from the input layer to the output layer in the fastest possible way. Please determine the minimum number of multiplications required for this neural network.

📄 成大113
跳轉到第題
▤完整推導請見《WH 資工筆記 · 演算法》Ch3 動態規劃
本章題號 · 21–40 / 40