Skip to content

Commit

Permalink
Fix #722, broken BN _config.yml settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Atcold committed Dec 16, 2020
1 parent 6880e59 commit 89343e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ sr:
################################### Bengali ####################################
bn:
title: 'ডীপ লার্নিং'
chapters:
- path: bn/week02/02.md
sections:
- path: bn/week02/02-1.md
26 changes: 13 additions & 13 deletions docs/bn/week02/02-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors: Amartya Prasad, Dongning Fang, Yuxin Tang, Sahana Upadhya
date: 3 Feb 2020
lang: bn
translation-date: 11 Dec 2020
translator: [Khalid Saifullah](https://github.com/khalidsaifullaah)
translator: Khalid Saifullah
---


Expand Down Expand Up @@ -61,7 +61,7 @@ $$


#### কম্পিউটেশন গ্রাফগুলোর জন্য ব্লক ডায়াগ্রাম নোটেশন
<!--
<!--
- Variables (tensor, scalar, continuous, discrete)
- <img src="{{site.baseurl}}/images/week02/02-1/x.PNG" alt="x" style="zoom:50%;" /> is an observed input to the system
- <img src="{{site.baseurl}}/images/week02/02-1/y.PNG" alt="y" style="zoom:50%;" /> is a computed variable which is produced by a deterministic function
Expand Down Expand Up @@ -155,7 +155,7 @@ $$L(S,w) = \frac{1}{P} \sum_{(x,y)} L(x,y,w)$$
<!-- **Gradient Descent Intuition** - Imagine being in a mountain in the middle of a foggy night. Since you want to go down to the village and have only limited vision, you look around your immediate vicinity to find the direction of steepest descent and take a step in that direction. -->
**গ্রেডিয়েন্ট ডিসেন্ট এর ধারণা** - মনে কর একটি কুয়াশাচ্ছন্ন রাতে তুমি কোনো একটি পাহাড়ের উপর দাঁড়িয়ে আছো। যেহেতু তুমি পাহাড় থেকে নেমে নিচের জনবসতি এলাকায় যেতে চাও এবং তুমি চোঁখে তেমন কিছু দেখতে পাচ্ছনা তাহলে তুমি কি করবে? তুমি তোমার পায়ের কাছের সবচেয়ে নিম্নগামী যেই পথটি আছে সেদিকে পা বাড়াবে। গ্রেডিয়েন্ট ডিসেন্ট ও একই কাজ টি করে থাকে।

<!--
<!--
**Different methods of Gradient Descent**
- Full (batch) gradient descent update rule :
Expand Down Expand Up @@ -185,13 +185,13 @@ $\eta$ is a constant here but in more sophisticated algorithms, it could be a ma

- SGD (স্টোকাস্টিক গ্রেডিয়েন্ট ডিসেন্ট) এর আপডেট রুল :

- যেকোনো একটি $p \in \lbrace 0, \cdots, P-1 \rbrace$ ধরে নাও, এরপর আপডেট কর
- যেকোনো একটি $p \in \lbrace 0, \cdots, P-1 \rbrace$ ধরে নাও, এরপর আপডেট কর

$$
w \leftarrow w - \eta \frac{\partial L(x[p], y[p],w)}{\partial w}
$$

যেখানে ${w}$ হচ্ছে প্যারামিটার যা আমরা অপ্টিমাইজ করছি
যেখানে ${w}$ হচ্ছে প্যারামিটার যা আমরা অপ্টিমাইজ করছি

$\eta$ এখানে একটি ধ্রুবক তবে আরও জটিল অ্যালগরিদমে এটি ম্যাট্রিক্স হতে পারে।

Expand Down Expand Up @@ -273,7 +273,7 @@ $$
s[i]=\sum_{j \in UP(i)}w[i,j]\cdot z[j]
$$

where $UP(i)$ denotes the predecessors of $i$ and $z[j]$ is the $j$th output from the previous layer.যেখানে $UP(i)$ দ্বারা বুঝায় ${i}$ এর পূর্ববর্তী নোডগুলো এবং $z[j]$ হচ্ছে পূর্ববর্তী লেয়ার এর $j$ তম আউটপুট
where $UP(i)$ denotes the predecessors of $i$ and $z[j]$ is the $j$th output from the previous layer.যেখানে $UP(i)$ দ্বারা বুঝায় ${i}$ এর পূর্ববর্তী নোডগুলো এবং $z[j]$ হচ্ছে পূর্ববর্তী লেয়ার এর $j$ তম আউটপুট

আউটপুট $z[i]$ নিম্নলিখিত উপায়ে বের করা হয়:

Expand Down Expand Up @@ -309,7 +309,7 @@ $$
$$

<!-- Hence if we have a chain of those functions in the network, we can backpropagate by multiplying by the derivatives of all the ${h}$ functions one after the other all the way back to the bottom. -->
অতএব আমাদের যদি এরকম ফাংশন এর চেইন থাকে নেটওয়ার্ক এ, তাহলে আমরা সবগুলো ডেরিভেটিভ ফাংশন ${h}$ এর গুণ এর মাধ্যমে ব্যাকপ্রোপাগেট করতে পারি একেবারে নিচে এসে পৌঁছানো পর্যন্ত।
অতএব আমাদের যদি এরকম ফাংশন এর চেইন থাকে নেটওয়ার্ক এ, তাহলে আমরা সবগুলো ডেরিভেটিভ ফাংশন ${h}$ এর গুণ এর মাধ্যমে ব্যাকপ্রোপাগেট করতে পারি একেবারে নিচে এসে পৌঁছানো পর্যন্ত।


<!-- It’s more intuitive to think of it in terms of perturbations. Perturbing $s$ by $\mathrm{d}s$ will perturb $z$ by: -->
Expand Down Expand Up @@ -422,7 +422,7 @@ out = model(image)
| <center>চিত্র ৮: একটি ফাংশনাল মডিউল এর মধ্য দিয়ে ব্যাকপ্রপ </center>|


- ভেক্টর ফাংশন এর জন্য চেইন রুল ব্যবহার করে
- ভেক্টর ফাংশন এর জন্য চেইন রুল ব্যবহার করে

$$
z_g : [d_g\times 1]
Expand All @@ -443,7 +443,7 @@ out = model(image)
<!-- This is the basic formula for $\frac{\partial c}{\partial{z_f}}$ using the chain rule. Note that the gradient of a scalar function with respect to a vector is a vector of the same size as the vector with respect to which you differentiate. In order to make the notations consistent, it is a row vector instead of a column vector. -->
এটি $\frac{\partial c}{\partial{z_f}}$ এর চেইন রুল ব্যবহার করে বেসিক ফর্মুলা। লক্ষ্য কর, একটি ভেক্টর এর সাপেক্ষে একটি স্কেলার ফাংশন এর গ্রেডিয়েন্ট হচ্ছে একটি ভেক্টর যার আকার যেই ভেক্টর এর সাপেক্ষে ডিফারেন্সিয়েট করা হয়েছে। নোটেশনগুলোকে সামঞ্জস্যপূর্ণ করার জন্য, এটি কলাম ভেক্টর এর বদলে একটি রো ভেক্টর।

- জ্যাকোবিয়ান ম্যাট্রিক্স
- জ্যাকোবিয়ান ম্যাট্রিক্স

$$
\left(\frac{\partial{z_g}}{\partial {z_f}}\right)_{ij}=\frac{(\partial {z_g})_i}{(\partial {z_f})_j}
Expand All @@ -458,7 +458,7 @@ out = model(image)

### মাল্টি-স্টেজ গ্রাফের এর মধ্য দিয়ে ব্যাকপ্রপ

<!--
<!--
Consider a stack of many modules in a neural network as shown in Figure 9. -->
একটি নিউরাল নেটওয়ার্ক এর মধ্যে অনেকগুলো মডিউল এর সারি চিন্তা করো চিত্র ৯ এর মতো।

Expand All @@ -468,7 +468,7 @@ Consider a stack of many modules in a neural network as shown in Figure 9. -->
<!-- For the backprop algorithm, we need two sets of gradients - one with respect to the states (each module of the network) and one with respect to the weights (all the parameters in a particular module). So we have two Jacobian matrices associated with each module. We can again use chain rule for backprop. -->
ব্যাকপ্রপ এলগোরিদমটির জন্য আমাদের গ্রেডিয়েন্ট এর ২ টি সেট প্রয়োজন - একটি স্টেটগুলোর সাপেক্ষে (নেটওয়ার্ক এর প্রতিটি মডিউল) এবং আরেকটি হচ্ছে ওয়েইটগুলোর সাপেক্ষে (কোনো একটি নির্দিষ্ট মডিউল এর সকল প্যারামিটার)। তাই প্রতিটি মডিউল দুটি করে জাকোবিয়ান ম্যাট্রিক্স যুক্ত। আমরা আবারো ব্যাকপ্রপ এর জন্য চেইন রুল ব্যবহার করতে পারি।

- ভেক্টর ফাংশন এর জন্য চেইন রুল ব্যবহার করে
- ভেক্টর ফাংশন এর জন্য চেইন রুল ব্যবহার করে

$$
\frac{\partial c}{\partial {z_k}}=\frac{\partial c}{\partial {z_{k+1}}}\frac{\partial {z_{k+1}}}{\partial {z_k}}=\frac{\partial c}{\partial {z_{k+1}}}\frac{\partial f_k(z_k,w_k)}{\partial {z_k}}
Expand All @@ -479,6 +479,6 @@ Consider a stack of many modules in a neural network as shown in Figure 9. -->
$$

- মডিউলটির জন্য ২ টি জ্যাকোবিয়ান ম্যাট্রিক্স
- একটি $z[k]$ এর সাপেক্ষে
- একটি $w[k]$ এর সাপেক্ষে
- একটি $z[k]$ এর সাপেক্ষে
- একটি $w[k]$ এর সাপেক্ষে

6 changes: 3 additions & 3 deletions docs/bn/week02/02.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ lang-ref: ch.02
title: Week 2
lang: bn
translation-date: 13 Dec 2020
translator: [Khalid Saifullah](https://github.com/khalidsaifullaah)
translator: Khalid Saifullah
---


<!-- ## Lecture part A -->
## প্রথম ভাগ
## প্রথম ভাগ

<!-- We start by understanding what parametrised models are and then discuss what a loss function is. We then look at Gradient-based methods and how it's used in the backpropagation algorithm in a traditional neural network. We conclude this section by learning how to implement a neural network in PyTorch followed by a discussion on a more generalized form of backpropagation. -->
আমরা প্যারামেট্রাইজড মডেল দিয়ে শুরু করবো এই অংশে, এরপর আমরা লস ফাংশন নিয়ে আলোচনা করবো। আমরা আরো দেখবো গ্রেডিয়েন্ট বেসড-মেথড গুলো কি এবং কিভাবে সেগুলো প্রচলিত নিউরাল নেটওয়ার্ক এ ব্যবহৃত হয়। সবশেষে আমরা পাইটর্চ দিয়ে একটি নিউরাল নেটওয়ার্ক বানাবো এবং ব্যাকপ্রোপাগেশন এর আরো জেনেরালাইজড ফর্ম দিয়ে এই অংশটি শেষ করবো।


<!-- ## Lecture part B -->
## দ্বিতীয় ভাগ
## দ্বিতীয় ভাগ

<!-- We begin with a concrete example of backpropagation and discuss the dimensions of Jacobian matrices. We then look at various basic neural net modules and compute their gradients, followed by a brief discussion on softmax and logsoftmax. The other topic of discussion in this part is Practical Tricks for backpropagation. -->
আমরা এই অংশে ব্যাকপ্রোপাগেশন এর একটি পূর্ণ উদাহরণ দিয়ে শুরু করবো এবং জ্যাকোবিয়ান ম্যাট্রিক্স এর ডাইমেনশন নিয়ে আলোচনা করবো। এরপর আমরা নিউরাল নেটওয়ার্ক এর সাধারণ কিছু মডিউল দেখবো এবং সেগুলোর গ্রেডিয়েন্ট ও বের করবো, এছাড়াও সংক্ষিপ্ত আকারে softmax এবং logsoftmax নিয়েও কথা বলবো। এই অংশের আরেকটি বিষয় হচ্ছে ব্যাকপ্রোপাগেশনের কিছু প্র্যাক্টিক্যাল ট্রিক্স।
Expand Down

0 comments on commit 89343e7

Please sign in to comment.