python 神经网络编程

根据《python 神经网络编程》(【英】塔里克.拉希德 tariq r中国工信出版社,人民邮电出版社)进行了初步实践,发现该书是入门的不二之选。

环境:

1、IDE:sublime_txt,配合python的相关插件

2、编译运行环境,推荐使用virtualenv沙盒环境

程序

# neural network class definition
import numpy
import scipy.special
import matplotlib.pyplot as plt


class NeuralNetwork:

    # initialise the neural network
    def __init__(self, inputnodes, hiddennodes, outputnodes, learningrate):
        # set number of nodes in each input,hidden,output layer
        self.inodes = inputnodes
        self.hnodes = hiddennodes
        self.onodes = outputnodes

        # link weight matrices , wih and who
        # weights inside the arrays w_i_j, where link is from node i to node j in the next layer
        self.wih = numpy.random.normal(
            0.0, pow(self.hnodes, -0.5), (self.hnodes, self.inodes))
        self.who = numpy.random.normal(
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值