原创 python函數定義中的冒號和箭頭

定義:  def f(ham: str, eggs: str) -> str: ''' :str提醒你傳一個str,但並不能約束你 -> str 提醒你目標返回值是一個str,但並不能約束你

原创 修改JupyterNotebook初始路徑

參考博客:https://www.cnblogs.com/zwt20120701/p/11253297.html 打開Anaconda Promp 輸入命令 jupyter notebook --generate-config 根據顯示的

原创 python命令行標準解析庫:argparse

官方Tutorial: https://docs.python.org/3/howto/argparse.html#id1 中文參考:https://www.cnblogs.com/dengtou/p/8413609.html argpa

原创 ImportError: dlopen: cannot load any more object with static TLS

該問題在使用import torch時出現。 這是一個非常詭異的問題,可以發現在github有大量關於該問題的討論,然而並沒有一個根本性的解決方法,並且該問題並不僅僅在使用torch時出現,用tensorflow也有可能出現。 解決方法:

原创 NMS (Non-Maximum Suppression) 非極大值抑制

參考博文:https://blog.csdn.net/shuzfan/article/details/52711706                   https://blog.csdn.net/leviopku/article/de

原创 CenterNet代碼之總體結構

CenterNet(Objects as points)開源代碼:https://github.com/xingyizhou/CenterNet 代碼結構: CenterNer-master | |--data # 數

原创 MS coco 數據集的使用

MS COCO:Microsoft Common Objects in Context 官網:http://cocodataset.org/#download 用途:CV方向通用目標檢測或者語義分割的benchmark   這篇博客寫給和

原创 TridentNet筆記

論文地址: Abstract(以摘要爲提綱,每句話對應筆記中的一部分) Scale variation is one of the key challenges in object detection. (首句表明本文就是在Scale v

原创 復現CenterNet

源碼地址:https://github.com/xingyizhou/CenterNet 新手上路先看readme.md,本文按照readme的思路一步步復現 1.Installation Please refer to INSTALL.

原创 from __future__ import 是什麼東東?

from __future__ import XXX   #  引入新版本的功能模塊,你寫python2也得按照python3的寫法來 舉個栗子: from __future__ import print_function  # 

原创 python包的相對導入和絕對導入

絕對導入:從要導入文件的頂級包開始寫起 print(__package__) # 打印出該文件所在包的路徑 以下面所示項目文件結構爲例: # ​​頂級包一般是項目文件夾中最上層的包,比如說a,b中的模塊的頂級包就分別是a,b #

原创 No module named ''; '' is not a pack

包名和包中文件名相同,此時在包內部運行代碼就會出錯

原创 Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight';

RuntimeError: Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight'; but d

原创 tqdm進度條 在pytorch中的使用

引入該模塊: from tqdm import tqdm tqdm可用於所有可迭代對象,所以可以直接用在dataloader上,如下: for data, target in tqdm(train_loader): ... 效

原创 TypeError: 'module' object is not callable

這個錯誤的根本原因:你真正導入的模塊 和 你想導入的模塊 不是一個東東 情況一:        自己定義的文件名和python自帶庫名相同 ,python就懵逼了! 情況二: 想使用進度條庫,直接導入如下 import tqdm 這時調