摘要:#me@me:~/me/vision/torchvision/datasets$ cat utils.py import os import os.path import hashlib import gzip import errno import tarfile import zipfile from torch.utils.model_zoo import tqdm def ...
阅读全文
摘要:https://leemendelowitz.github.io/blog/how-does-python-find-packages.html https://www.cnblogs.com/qingspace/p/5284480.html - 按照Python的约定,需要在animal文件夹中创
阅读全文
摘要:flag = -1 frame = 0 point_id = 0 rc_file = './suzhou_0508.txt' with open(rc_file,'r') as f: for line in f.readlines(): content = line.strip('\n') a = content.split(";") ...
阅读全文
摘要:https://692088846.iteye.com/blog/2005600 http://www.zhetenga.com/view/utf%208%E4%B8%AD%E7%9A%84bom%20u%2Bfeff%E4%B8%8Ejson%20decode%E9%94%99%E8%AF%AF-
阅读全文
摘要:$ cat label_cal.py # count function; lambda; sort the dict; save the dict #https://www.cnblogs.com/wind-wang/p/6090708.html #https://www.cnblogs.com/wind-wang/p/6090708.html category = [] test = []...
阅读全文
摘要:如何判断一个列表中的元素是否在另一个列表中 From: https://blog.csdn.net/chenpe32cp/article/details/81945335
阅读全文
摘要:>>> np.frombuffer(b'\x00\x3c\x11\x12', np.float32) array([4.582789e-28], dtype=float32) 参考 https://blog.csdn.net/seele52/article/details/8995486 Pytho
阅读全文
摘要:# read_fp16.py import numpy as np import cv2 import scipy.misc fp16_file = "./0.fp16" print("fp16_file is {}:".format(fp16_file)) image_test = np.fromfile(fp16_file) print("\nThe fp16 format imag...
阅读全文
摘要:# cat rccb_to_fp16.py import numpy as np import cv2 import scipy.misc image_dir='./' img_height = 1208 #604 # Height of the model input images img_width = 1920 #960 # Width of the model input i...
阅读全文
摘要:import numpy as np import cv2 import scipy.misc image_dir='./' img_height = 604 #1208 #604 # Height of the model input images img_width = 960 #1920 #960 # Width of the model input images im...
阅读全文
摘要:深入浅出的TensorFlow数据格式化存储工具TFRecord用法教程TFRecord是TensorFlow官方推荐使用的数据格式化存储工具,它不仅规范了数据的读写方式,还大大地提高了IO效率。 1.使用TFRecord的理由TFRecord内部使用了“Protocol Buffer”二进制数据编
阅读全文
摘要:import os import tensorflow as tf from PIL import Image import matplotlib.pyplot as plt import numpy as np import glob def convert_tfrecord_dataset(): cwd = os.getcwd() writer= tf.python_io.TF...
阅读全文
摘要:#Below is the sample to run numba benchmark #install and setting pip install numba export NUMBAPRO_LIBDEVICE=/usr/local/cuda/nvvm/libdevice export NUMBAPRO_NVVM=/usr/local/cuda/nvvm/lib64/libnvvm.so...
阅读全文
摘要:import cv2 import numpy as np height = 64 # Height of the model input images width = 64 # Width of the model input images image_file = "5938dde6f51cd200a32e7608.fp16" image = np.fromfile(im...
阅读全文
摘要:Use below code to get each channel's array
阅读全文
摘要:https://blog.csdn.net/Jerr__y/article/details/78594786
阅读全文