原创 ImportError: cannot import name 'issparse'?

在使用jupyter notebook時,出現了這個問題,突然發現是自己忘記下scipy了。 解決:進入cmd 輸入: pip3 install scipy 收工。

原创 TypeError: softmax() got an unexpected keyword argument 'axis'問題解決

原因: tensorflow 和 keras版本不匹配,可以將keras升級或降級到對應的版本。 以下是已知版本的適配: tensorflow

原创 選數

Description 已知 n 個整數 x1,x2,…,xn,以及一個整數 k(k<n)。從 n 個整數中任選 k 個整數相加,可分別得到一系列的和。例如當 n=4,k=3,4 個整數分別爲 3,7,12,19 時,可得全部的組

原创 遞歸dfs

//DFS 深度優先搜索; #include<iostream> #define N 20 int a[N]; int n, k; bool dfs(int i, int sum) { //以遞歸來判斷; if (i ==