上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 33 下一页
摘要: import java.util.LinkedList; import java.util.Queue; class Solution { public boolean hasValidPath(int[][] grid) { int[][] visited = new int[grid.lengt 阅读全文
posted @ 2020-06-17 17:34 欣姐姐 阅读(205) 评论(0) 推荐(0) 编辑
摘要: public void nextPermutation(int[] nums) { int i = nums.length -2; while(i>=0 && nums[i+1] <= nums[i]){ i--; } if(i>=0){ int j = nums.length -1; while( 阅读全文
posted @ 2020-05-29 15:24 欣姐姐 阅读(175) 评论(0) 推荐(0) 编辑
摘要: class Solution { public ListNode deleteNode(ListNode head, int val) { ListNode ln = head; ListNode p = new ListNode(); p.next = ln; head = p; while(ln 阅读全文
posted @ 2020-05-29 10:31 欣姐姐 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 先随便设置的参数: 没想到它居然有效果: 这弯弯扭扭的准确率曲线看上去势头还不错。准确率百分之40.5%。 将epoch由500设置为5000看看: 是不是不池化更好一点。。。 把池化层去掉,epoch设置为6000: loss下降了一点点,accuracy下降了一点,,但是要是提前停止训练,应该会 阅读全文
posted @ 2019-11-29 19:45 欣姐姐 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 输出层没有添加激活函数softmax 虽然loss的值不高,但是accuracy的值也很低,虽然训练集的loss一致在下降,但是测试集的loss却在震荡,几乎不变。不知道该怎么解决。——2019.11.28 11:29 输出层添加了softmax激活函数之后: 为什么验证集的Loss降到一半就再不降 阅读全文
posted @ 2019-11-29 16:46 欣姐姐 阅读(648) 评论(0) 推荐(0) 编辑
摘要: 似懂非懂。。 class Solution: def diameterOfBinaryTree(self, root: TreeNode) -> int: self.ans=1 def depth(node): if not node: return 0 L=depth(node.left) R=d 阅读全文
posted @ 2019-11-22 22:51 欣姐姐 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 不是自己写的。。 class Solution: def smallestFromLeaf(self, root: TreeNode) -> str: self.ans="~" def dfs(node,A): if node: A.append(chr(node.val+ord('a'))) if 阅读全文
posted @ 2019-11-22 22:36 欣姐姐 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 很简单,,但是自己还是没写出来。。。。 class Solution: def sumNumbers(self, root: TreeNode) -> int: self.res=0 def helper(root,tmp): if not root:return if not root.left 阅读全文
posted @ 2019-11-22 22:23 欣姐姐 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 自己还是没做出来。。 class Solution: def binaryTreePaths(self, root: TreeNode) -> List[str]: if not root: return [] res=[] def helper(root,temp): if not root.le 阅读全文
posted @ 2019-11-21 20:15 欣姐姐 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 同看懂做不出来。。。 class Solution: def pathSum(self, root: TreeNode, sum: int) -> List[List[int]]: res=[] if not root: return [] def helper(root,sum,tmp): if 阅读全文
posted @ 2019-11-21 20:06 欣姐姐 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 33 下一页