Skip to content

Instantly share code, notes, and snippets.

View vamsikavuru's full-sized avatar

Vamsi Krishna Kavuru vamsikavuru

  • Sampradaa Software Technologies PVT LTD
  • BANGALORE
  • 11:14 (UTC +05:30)
View GitHub Profile
@vamsikavuru
vamsikavuru / readme.md
Created November 27, 2020 06:25 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

def updatePerceptron(X, y, W, learn_rate = 0.005):
del_w = np.zeros(W.shape)
n_records = len(X)
for i in range(n_records):
pred = prediction(X[i], W)
# error for the probability of class 1 and class 2 is the same
# so we can calculate error with any one of them
error = y[i] - pred
# The gradient descent step, the error times the inputs
del_w += error * X[i]