自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 ValueError: Caught ValueError in DataLoader worker process 0.

检查数据集拷贝是否完整,检查后发现数据特征拷贝由于进程中断,数据包大小比完整的小,故报错。

2022-09-09 10:00:41 4009 1

原创 【无标题】

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 453

原创 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 70

原创 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 108 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 47

原创 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 45

原创 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 83

原创 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 97 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 53

原创 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 46

原创 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 47

原创 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 40

原创 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 44

原创 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 50

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除