xuetuzzz 2022-04-29 00:17 采纳率: 100%
浏览 167
已结题

[Matlab] Newff函数

问题遇到的现象和发生背景

xtrain_guiyi为输入矩阵 8108 ,y_train为目标矩阵1108

问题相关代码,请勿粘贴截图

net = newff(xtrain_guiyi,y_train,12,{'tansig','logsig'},'trainlm')

运行结果及报错内容

net =

Neural Network

          name: 'Custom Neural Network'
      userdata: (your custom info)

dimensions:

     numInputs: 1
     numLayers: 3
    numOutputs: 1
numInputDelays: 0
numLayerDelays: 0

numFeedbackDelays: 0
numWeightElements: 193
sampleTime: 1

connections:

   biasConnect: [1; 1; 1]
  inputConnect: [1; 0; 0]
  layerConnect: [0 0 0; 1 0 0; 0 1 0]
 outputConnect: [0 0 1]

subobjects:

         input: Equivalent to inputs{1}
        output: Equivalent to outputs{3}

        inputs: {1x1 cell array of 1 input}
        layers: {3x1 cell array of 3 layers}
       outputs: {1x3 cell array of 1 output}
        biases: {3x1 cell array of 3 biases}
  inputWeights: {3x1 cell array of 1 weight}
  layerWeights: {3x3 cell array of 2 weights}

functions:

      adaptFcn: 'adaptwb'
    adaptParam: (none)
      derivFcn: 'defaultderiv'
     divideFcn: 'dividerand'
   divideParam: .trainRatio, .valRatio, .testRatio
    divideMode: 'sample'
       initFcn: 'initlay'
    performFcn: 'mse'
  performParam: .regularization, .normalization
      plotFcns: {'plotperform', 'plottrainstate',
                'plotregression'}
    plotParams: {1x3 cell array of 3 params}
      trainFcn: 'trainlm'
    trainParam: .showWindow, .showCommandLine, .show, .epochs,
                .time, .goal, .min_grad, .max_fail, .mu, .mu_dec,
                .mu_inc, .mu_max

weight and bias values:

            IW: {3x1 cell} containing 1 input weight matrix
            LW: {3x3 cell} containing 2 layer weight matrices
             b: {3x1 cell} containing 3 bias vectors

methods:

         adapt: Learn while in continuous use
     configure: Configure inputs & outputs
        gensim: Generate Simulink model
          init: Initialize weights & biases
       perform: Calculate performance
           sim: Evaluate network outputs given inputs
         train: Train network with examples
          view: View diagram
   unconfigure: Unconfigure inputs & outputs

evaluate:       outputs = net(inputs)
我的解答思路和尝试过的方法
我想要达到的结果

我这个代码写法是对的吗? 那个12是指隐含层神经元的个数吗?
这个输出结果我看不懂。

  • 写回答

2条回答 默认 最新

  • 秋刀鱼程序编程 2022-04-30 13:41
    关注

    12那个不是隐含层,隐含层是输出代码中的第9行,隐含层神经元为3个

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 5月9日
  • 已采纳回答 5月1日
  • 赞助了问题酬金5元 4月30日
  • 赞助了问题酬金5元 4月29日
  • 展开全部

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)