Logo

  • myhaspl

    发布于:1 小时前

    0

    mxnet-自定义前向函数
    #!/usr/bin/envpython2#-*-coding:utf-8-*-"""CreatedonFriAug1016:13:292018@author:myhaspl"""frommxnetimportndfrommxnet.gluonimportnnclassMixMLP(nn.Block):def__init__(self,**kwargs):#Run`nn.Block`'sinitm
    阅读 4 评论 0 收藏 0
  • myhaspl

    发布于:16 小时前

    0

    mxnet-Dense
    #!/usr/bin/envpython2#-*-coding:utf-8-*-"""CreatedonFriAug1016:13:292018@author:myhaspl"""frommxnetimportndfrommxnet.gluonimportnnlayer=nn.Dense(2)#输出layer.initialize()x=nd.random.uniform(-1,1,(3,4))#
    阅读 4 评论 0 收藏 0
  • myhaspl

    发布于:16 小时前

    0

    mxnet-Sequential
    #!/usr/bin/envpython2#-*-coding:utf-8-*-"""CreatedonFriAug1016:13:292018@author:myhaspl"""frommxnetimportndfrommxnet.gluonimportnnnet=nn.Sequential()#Addasequenceoflayers.net.add(#SimilartoDense,itisn
    阅读 5 评论 0 收藏 0
  • myhaspl

    发布于:16 小时前

    0

    mxnet-NDArray
    #!/usr/bin/envpython2#-*-coding:utf-8-*-"""CreatedonFriAug1016:13:292018@author:myhaspl"""frommxnetimportndx1=nd.array(((1,2,3),(5,6,7)))x2=nd.array(((10,20,30),(50,60,70)))y1=x1+x2y2=x1*x2printy1prin
    阅读 9 评论 0 收藏 0
  • myhaspl

    发布于:16 小时前

    0

    mxnet-索引
    Thebasicslicesyntaxisi:j:kwhereiisthestartingindex,jisthestoppingindex,andkisthestep().Thisselectsthemelements(inthecorrespondingdimension)withindexvaluesi,i+k,...,i+(m-1)kwhereandqandrarethequotienta
    阅读 1 评论 0 收藏 0
  • myhaspl

    发布于:16 小时前

    0

    mxnet-reshape
    #-*-coding:utf-8-*-"""SpyderEditorThisisatemporaryscriptfile."""importmxnetasmximportnumpyasnpx=mx.nd.arange(0a,12).reshape(4,3)printxy=x.reshape(3,0)printyy=x.reshape(0,3)printyy=x.reshape(0,2)printy
    阅读 1 评论 0 收藏 0
  • myhaspl

    发布于:16 小时前

    0

    mxnet-broadcast,shape,ndim
    #-*-coding:utf-8-*-"""SpyderEditorThisisatemporaryscriptfile."""importmxnetasmximportnumpyasnpx=mx.nd.arange(0,3).reshape((1,3,1))printxy=x.broadcast_to((2,3,3))printyx=mx.nd.array([1,2,3,4])printx.nd
    阅读 1 评论 0 收藏 0
  • myhaspl

    发布于:17 小时前

    0

    mxnet-repeat
    #-*-coding:utf-8-*-"""SpyderEditorThisisatemporaryscriptfile."""importmxnetasmxx=mx.nd.array([[1,2],[3,4]])printmx.nd.repeat(x,repeats=2)printmx.nd.repeat(x,repeats=2,axis=1)printmx.nd.repeat(x,repeat
    阅读 3 评论 0 收藏 0
  • myhaspl

    发布于:17 小时前

    0

    mxnet-type,context,copyto
    #-*-coding:utf-8-*-"""SpyderEditorThisisatemporaryscriptfile."""importmxnetasmximportnumpyasnpx=mx.nd.zeros((3,5,2))printx.sizex=mx.nd.array([1,2,3,4])printx.contextprinttype(x.context)x=mx.nd.zeros((
    阅读 2 评论 0 收藏 0
  • myhaspl

    发布于:17 小时前

    0

    mxnet-Activation激活函数
    支持以下激活函数:relu:RectifiedLinearUnit,y=max(x,0)y=max(x,0)sigmoid:y=11+exp(−x)y=11+exp(−x)tanh:Hyperbolictangent,y=exp(x)−exp(−x)exp(x)+exp(−x)y=exp(x)−exp(−x)exp(x)+exp(−x)softrelu:SoftReLU,orSoftPlus,y=
    阅读 3 评论 0 收藏 0
写文章