Angela  Dickens

Angela Dickens

1596723060

Neural Nets Aren’t Black Boxes

If you think neural nets are black boxes, you’re certainly not alone. While they may not be as interpretable as something like a random forest (at least not yet), we can still understand how they process data to arrive at their predictions. In this post we’ll do just that as we build our own network from scratch, starting with logistic regression.

If you think neural nets are black boxes, you’re certainly not alone. While they may not be as interpretable as something like a random forest (at least not yet), we can still understand how they process data to arrive at their predictions. In this post we’ll do just that as we build our own network from scratch, starting with logistic regression.

This post is very much inspired by this fantastic post by Sylvain Gugger. We won’t pretend to improve upon Sylvain’s post; we just want to explain things in our own way to help us understand things a little better. This post is the first of a series of posts in which we’ll build our own DNN, CNN, and RNN in numpy. You can find all of the source code at tinytorch.

Objective

Our goal is to construct a binary logistic classifier as a neural network. The network will consist of a single linear layer followed by a sigmoid activation with binary cross entropy as the loss. We’ll begin by deriving the back-prop equations for our particular scenario and in doing so we’ll see that what we’ve done generalizes immediately to networks with arbitrary layers and activations. In other words, we’ll have developed a framework that can model any feedforward network — all by starting from ordinary logistic regression.

Actually, this isn’t all that surprising when you think about it. Logistic regression is a linear layer followed by sigmoid and feedforward networks are just a bunch of linear layers stacked together with non-linearities in between.

Back-propagation

Back-propagation is nothing more than the chain rule. We can view our logistic network as the composition of three functions

Image for post

While the loss function is not usually viewed as a layer of the network, treating it as the final layer makes computing the gradients easier. Let’s denote the output of the i-th layer by xi so that

Image for post

The first gradient we have to compute is the gradient of BCE with respect to the activations x2.

Image for post

Next we have to compute the gradient with respect to the linear outputs x1. The chain rule tells us

Image for post

Last, we’ll need to compute the gradient with respect to the original inputs x.

Image for post

Notice a pattern? The first gradient we computed — the gradient with respect to the network’s final activations — is used to compute the next gradient — the gradient with respect to the linear outputs — which is in turn used to compute the gradient with respect to the original inputs. To compute the gradients of any network, we simply start at the last layer and successively pass the gradients backwards to the preceding layer until we arrive at the original inputs. That’s the reason it’s called back-propagation. It really is helpful to picture passing the gradients backwards through the network like a baton.

We’ll compute each of these gradients in turn, starting with the last layer and working our way backwards to the original inputs.

#deep-learning #data-science #neural-networks #machine-learning #python #deep learning

What is GEEK

Buddha Community

Neural Nets Aren’t Black Boxes

tu locker

1635748246

Sự hiện diện của giải pháp Smart Locker, như một nâng tầm dịch vụ, sẽ giúp khách hàng chứa đựng tư trang trước khi thoải mái tận hưởng thời gian mua sắm.

#tủ_locker #tủ_sắt_locker   #locker #tu_sat_locker #tu_locker #tủ_locker_sắt #tủ_nhân_viên #tu_locker_sat #tủ_locker_giá rẻ #tu_locker_gia_re #tủ_cá_nhân_locker #tủ_sắt_nhiều_ngăn #tủ_đựng_đồ_nhân_viên

Website: 

locker

tủ sắt nhiều ngăn

tủ đựng đồ nhân viên

tủ locker

tủ sắt locker


 

Smart Locker

APROP đã tin tưởng chọn Smart Locker là đơn vị đồng hành trong việc triển khai lắp đặt hệ thống Smart Locker Wireless với công nghệ hiện đại để phục vụ việc gửi/ nhận hồ sơ cho văn phòng.

#tủ_locker #tủ_sắt_locker #locker #tu_sat_locker #tu_locker #tủ_locker_sắt #tủ_nhân_viên #tu_locker_sat #tủ_locker_giá rẻ #tu_locker_gia_re #tủ_cá_nhân_locker #tủ_sắt_nhiều_ngăn #tủ_đựng_đồ_nhân_viên

Website: 

tủ locker

tủ locker

tủ sắt locker

locker

tu sat locker


 

Đặc biệt, bên cạnh một hệ thống tủ locker, các bộ khóa tủ là sự kết hợp hoàn hảo, hỗ trợ công tác bảo quản tư trang và lưu trữ hồ sơ quan trọng tại nơi công sở hiệu quả hơn.

#tủ_locker #tủ_sắt_locker #locker #tu_sat_locker #tu_locker #tủ_locker_sắt #tủ_nhân_viên #tu_locker_sat #tủ_locker_giá rẻ #tu_locker_gia_re #tủ_cá_nhân_locker #tủ_sắt_nhiều_ngăn #tủ_đựng_đồ_nhân_viên

Website: 

tủ locker

tu locker gia re

tủ cá nhân locker

tủ sắt nhiều ngăn

tủ đựng đồ nhân viên


 

lcoekr

Tủ thông minh giúp tăng đáng kể thời gian lao động cá nhân và đơn giản khâu vận hành. Công nghệ điện tử và điện thoại thông minh được sử dụng nhằm hạn chế lãng phí nguồn lực. 

#tủ_locker #tủ_sắt_locker #locker #tu_sat_locker #tu_locker #tủ_locker_sắt #tủ_nhân_viên #tu_locker_sat #tủ_locker_giá rẻ #tu_locker_gia_re #tủ_cá_nhân_locker #tủ_sắt_nhiều_ngăn #tủ_đựng_đồ_nhân_viên

Website: 

ilocker

tu locker sat

tủ locker giá rẻ

tu locker gia re

tủ cá nhân locker


 

cloek

Tủ locker ABS w600 khối gồm có 24 ngăn đều nhau, cánh sắt mở sử dụng khóa thông minh , tay nắm và có thêm tấm chia ngăn, trên mỗi cánh cửa được dập 1 bảng tên nhân viên và 1 lỗ thông gió

#tủ_locker #tủ_sắt_locker #locker #tu_sat_locker #tu_locker #tủ_locker_sắt #tủ_nhân_viên #tu_locker_sat #tủ_locker_giá rẻ #tu_locker_gia_re #tủ_cá_nhân_locker #tủ_sắt_nhiều_ngăn #tủ_đựng_đồ_nhân_viên

Website: 

ilocker

tủ sắt nhiều ngăn

tủ đựng đồ nhân viên

tủ locker

tủ sắt locker