Git Product home page Git Product logo

artificial-intelligence-recipes's People

Watchers

 avatar  avatar

artificial-intelligence-recipes's Issues

Getting ValueError

for i in range(60000):
#forwarding through the network
l0=x
l1=sigmoid(np.dot(10,syn0))
l2=sigmoid(np.dot(11,syn1))

#backpropogation of errors
l2_error = y-2
if(i % 10000): #print the error every 10000 steps to save time and to limit the amount of output
    print("Error: " + str(np.mean(np.abs(l2_error))))
    
l2_delta = l2_error*sigmoid(l2,deriv=True)
l1_error = l2_delta.dot(syn1.T)
l1_delta = l1_error * sigmoid(l1,deriv=True)

#updating weights
syn1 += l1.T.dot(l2_delta)
syn0 += l0.T.dot(l1_delta)

In the line: l2_delta = l2_error*sigmoid(l2,deriv=True) , getting an error:
ValueError: operands could not be broadcast together with shapes (4,4) (3,4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.