原创 鄰接矩陣轉鄰接表

#include <iostream> using namespace std; const int inf = 99999999; int arr[100][100]; typedef struct ArcNode{ int a

原创 Laravel插件拓展推薦(3):maatwebsite/excel

maatwebsite/excel的2.1.0版本 composer require "maatwebsite/excel:~2.1.0"(注:此種方法不能安裝了,會提示找不到包) 因此採用下面方式 1、在composer.json中添

原创 鄰接多重表2

#include <iostream> using namespace std; typedef struct EdgeBox{ int mark; int ivex,jvex; struct EdgeBox *ilink, *j

原创 鄰接多重表

#include <iostream> using namespace std; typedef struct ArcNode{ int adjvex; int weight; ArcNode * next; }ArcNode;

原创 求鄰接表節點的入度 出度

#include <iostream> using namespace std; int count1[100] = {0},count2[100] = {0}; typedef struct ArcNode{ int adjvex

原创 普通樹算法:求樹高、兄弟鏈表表示法

#include <iostream> typedef struct childSiblingTreeNode{ dataType data; childSiblingTreeNode *firstChild; childSi

原创 有向圖的鄰接錶轉逆鄰接表的算法

#include <iostream> using namespace std; typedef struct ArcNode{ int adjvex; int weight; ArcNode *next; }ArcNode;

原创 鄰接矩陣轉鄰接表

#include <iostream> using namespace std; const int inf = 99999999; int arr[100][100]; typedef struct ArcNode{ int a

原创 二叉樹構建、遍歷、線索、節點數目、深度、高度、(非)遞歸等操作

//Notice: this file.cpp can run on your pc; //input: example // 1 // 2 3 // you can input 1 2 0 0 3 0 0 // th

原创 ThinkPHP開發技巧集錦(12):模型小技巧

1、讀取器/獲取器: 獲取器的作用是在獲取數據的字段值後自動進行處理 public function getStatusAttr($value) { $status = [-1=>'刪除',0=>'禁用',1=>

原创 微信小程序開發技巧集錦(1):獲取openid、seeeion_key、expire_in

說明:本方法是PHP版本的,java 等類似步驟實現即可! 1、註冊賬號 https://mp.weixin.qq.com ,獲取 appID appSecret 2、配置 appID appSecret LoginUrl //1、配置

原创 技術共享

outline-style: none ; border: 1px solid #ccc; border-radius: 3px; padding: 13px 14px; width: 620px;

原创 keras 使用dropout 正則化 解決過擬合問題

import keras from keras.datasets import mnist from keras.utils import np_utils from keras.layers import Dense from ke

原创 mnist 數據集

基礎概念 one-hot:獨熱編碼 。將類別變量轉換爲機器學習算法易於利用的一種形式的過程。這個向量只有一個特徵是不爲0的,其他都是0,特別稀疏keras中用to_categorical實現獨熱編碼 from keras.utils.n

原创 keras 交叉熵 過擬合 dropout

交叉熵:crossentropy。交叉熵可在神經網絡(機器學習)中作爲損失函數,p表示真實標記的分佈,q則爲訓練後的模型的預測標記分佈,交叉熵損失函數可以衡量p與q的相似性。交叉熵作爲損失函數還有一個好處是使用sigmoid函數在梯度下降