- 博客(14)
- 收藏
- 关注
原创 ValueError: Caught ValueError in DataLoader worker process 0.
检查数据集拷贝是否完整,检查后发现数据特征拷贝由于进程中断,数据包大小比完整的小,故报错。
2022-09-09 10:00:41
4224
原创 【无标题】
Traceback (most recent call last): File “train_meta.py”, line 326,in train(epoch) File “train_meta.py”, line 221, in trainloss = region_loss(output, target) File “/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py”,line 477, in ca.
2021-11-18 16:55:50
475
原创 2021-03-26
Pythonclass Solution: def deleteDuplicates(self, head: ListNode) -> ListNode: if not head: return head cur = head while cur.next: if cur.val == cur.next.val: cur.next = cur.next.next.
2021-03-26 21:39:29
91
原创 2021-03-25
Python:class Solution: def deleteDuplicates(self, head: ListNode) -> ListNode: if not head: return head dummy = ListNode(0, head) cur = dummy while cur.next and cur.next.next: if cu.
2021-03-25 21:02:08
129
1
原创 2021-03-24
Python:检索两个下标,时间复杂度过高,超出时间限制class Solution(object): def find132pattern(self, nums): """ :type nums: List[int] :rtype: bool """ n = len(nums) for i in range(n): for j in range(i+1, n): ..
2021-03-24 23:02:23
71
原创 2021-03-23
Python# """# This is the interface that allows for creating nested lists.# You should not implement it, or speculate about its implementation# """#class NestedInteger(object):# def isInteger(self):# """# @return True if this Neste.
2021-03-23 19:58:01
64
原创 2021-03-22
Pythonclass Solution(object): def hammingWeight(self, n): """ :type n: int :rtype: int """ return bin(n).count("1")class Solution: def hammingWeight(self, n: int) -> int: ret = sum(1 for i in r.
2021-03-22 19:32:09
107
原创 2021-03-21
错误Pythonclass Solution(object): def setZeroes(self, matrix): """ :type matrix: List[List[int]] :rtype: None Do not return anything, modify matrix in-place instead. """ m, n = len(matrix), len(matrix[0]) .
2021-03-21 21:05:21
122
1
原创 2021-03-19
Pythonclass ParkingSystem(object): def __init__(self, big, medium, small): """ :type big: int :type medium: int :type small: int """ self.big = big self.medium = medium self.small = sma.
2021-03-19 21:16:24
69
原创 2021-03-18
Python之暴力枚举class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ n = len(nums) for i in range(n): for j in range(.
2021-03-18 21:36:18
64
原创 2021-03-17
Python:后向动态规划class Solution: def numDistinct(self, s: str, t: str) -> int: m, n = len(s), len(t) if m < n: return 0 dp = [[0] * (n + 1) for _ in range(m + 1)] for i in range(m + 1): .
2021-03-17 21:03:33
65
原创 2021-03-16
c++class Solution {public: vector<vector<int>> generateMatrix(int n) { int num = 1; vector<vector<int>> matrix(n, vector<int>(n)); int left = 0, right = n - 1, top = 0, bottom = n - 1; whi
2021-03-16 21:00:23
58
原创 2021-03-15
Python3class Solution: def spiralOrder(self, matrix: List[List[int]]) -> List[int]: if not matrix or not matrix[0]: return list() rows, columns = len(matrix), len(matrix[0]) visited = [[False] * columns
2021-03-15 21:19:44
62
原创 2021-03-12
Python3class Solution(object): def reformatDate(self, date): """ :type date: str :rtype: str """ month = {"Jan":"01", "Feb":"02", "Mar":"03", "Apr":"04", "May":"05", "Jun":"06", "Jul":"07", "Aug":"08", "Sep":"09
2021-03-12 21:31:57
74
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人