QA Official

Stores tensorflow's ckpt model as npy

https://qaofficial.com/post/2019/05/09/68706-stores-tensorflowamp#x27s-ckpt-model-as-npy.html 2019-05-09
#coding=gbk import numpy as np import tensorflow as tf from tensorflow.python import pywrap_tensorflow checkpoint_path='model.ckpt-5000'#your ckpt path reader=pywrap_tensorflow.NewCheckpointReader(checkpoint_path) var_to_shape_map=reader.get_variable_to_shape_map() alexnet={} alexnet_layer = ['conv1','conv2','conv3','conv4','conv5','fc6','fc7','fc8'] add_info = ['weights','biases'] alexnet={'conv1':[[],[]],'conv2':[[],[]],'conv3':[[],[]],'conv4':[[],[]],'conv5':[[],[]],'fc6':[[],[]],'fc7':[[],[]],'fc8':[[],[]]} for key in var_to_shape_map: #print ("tensor_name",key) str_name = key # 因为模型使用Adam算法优化的,在生成的ckpt中,有Adam后缀的

Understand the Triple Realm of SVM

https://qaofficial.com/post/2019/05/09/68944-understand-the-triple-realm-of-svm.html 2019-05-09
It can be said that the idea of SVM runs through the whole traditional machine learning method, which is not only the theoretical basis, but also a master.The author himself is very good. This blog post is well written and well summarized. This article is reproduced from: https://blog.csdn.net/v_JULY_v/article/details/7624837

What are the collection types of Java

https://qaofficial.com/post/2019/05/09/69361-what-are-the-collection-types-of-java.html 2019-05-09
The Collection classes used in Java API all implement the Collection interface.One of his class inheritance structures is as follows: collection <-list <-vector collection <-list <-arraylist collection <-list <-linked list collection <-set <-hashset collection <-set <-hashset <--linkedhassetcollection <-set <-sortedset <-treesetvector: List based on Array, in fact, encapsulates some functions that Array does not have for us to use, and it is impossible to go into the limitation of Array.It is impossible to surpass Array in performance.

faster-rcnn+ohem+vgg16+prototxt file and related code modification

https://qaofficial.com/post/2019/05/09/68692-faster-rcnn-ohem-vgg16-prototxt-file-and-related-code-modification.html 2019-05-09
Recently, I read OHEM and RBG, which is an improvement on Fast RCNN. The target candidate box extraction still uses the Selective Search algorithm.I intend to modify it on FastRCNN and make full use of RPN network to extract target candidate boxes.The whole revision is more convenient than others.The author of the related code paper of Fast RCNN+OHEM has already opened source on github, and the address is: https://github.com/abhi2610/ohem. We just need to improve on it.

hdu3829——Cat VS Dog (maximum independent set)

https://qaofficial.com/post/2019/05/09/68679-hdu3829cat-vs-dog-maximum-independent-set.html 2019-05-09
Problem Description The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child’s like-animal is a cat, then his/hers dislike-animal must be a dog, and vice versa. Now the zoo administrator is removing some animals, if one child’s like-animal is not removed

matlab——reshape of Reshape Function

https://qaofficial.com/post/2019/05/09/69130-matlabreshape-of-reshape-function.html 2019-05-09
reshape function: reshape that array, i. e. reshape the array. Read by Column. Syntax: A = reshape(A, M, N) or A = reshape(A, [ M, N ]) % Arranges rows and columns of A into M rows and N columns >> A=[1,2,3,4,5,6,7,8,9,10,11,12] A = 1 2 3 4 5 6 7 8 9 10 11 12 >> B=reshape(A,2,6) B = 1 3 5 7 9 11

multifunctional Label

https://qaofficial.com/post/2019/05/09/68833-multifunctional-label.html 2019-05-09
JJLabel There is a long-press copy function, and there is a block event when copying is about to be completed and when copying is about to be completed (this function is turned on by default). The code is as follows: JJLabel *copyLab = [[JJLabel alloc] init]; copyLab.frame = CGRectMake(20, 100, (superViewWidth - 20 * 2), 30); CopyLab.text = @ " ajie said: this is the content to be copied and will turn blue when copied"

package com.***.databinding does not exist

https://qaofficial.com/post/2019/05/09/68845-package-com..databinding-does-not-exist.html 2019-05-09
databinding is easy to use, but it is not so convenient to find a problem when you encounter a pit. The following is a problem I encountered today. Record it and it may help you. After that, I was able to compile and package normally last night. Today I sorted out the project files and moved several files to another package. I used Android Studio to move the files.

python Batch Series Code-Raster Data Processed by Mask

https://qaofficial.com/post/2019/05/09/68526-python-batch-series-code-raster-data-processed-by-mask.html 2019-05-09
import arcpy from arcpy import env from arcpy.sa import * import os import os.path import sys #arcpy.env.workspace = "D:\\TIF\\IMERGD\\Y" rootdir = 'D:\\TIF\\IMERGD\\Y' filenames = os.listdir(rootdir) for filename in filenames: if os.path.splitext(filename)[1] == '.tif': inRaster =rootdir + os.sep + filename outname = filename.replace('.tif','_cjmm') inMaskData = "D:\\TIF\\HB_PROVINCE.shp" arcpy.CheckOutExtension("Spatial") outExtractByMask = ExtractByMask(inRaster, inMaskData) print "ok" outExtractByMask.save("D:\\test\\"+outname+'.tif') print outname

python Batch Series Code-Raster Transition Point

https://qaofficial.com/post/2019/05/09/68509-python-batch-series-code-raster-transition-point.html 2019-05-09
import arcpy from arcpy import env from arcpy.sa import * import os import os.path import sys,string #arcpy.env.workspace = "D:\\TIF\\IMERGD\\Y" dir = "D:\\TIF\\IMERGD\\Y" filenames = os.listdir(dir) for filename in filenames: if os.path.splitext(filename)[1] == '.tif': inRaster = dir + os.sep + filename Output_Workspace = "D:\\test" basename = os.path.splitext(filename)[0] + '_bdmm'; outPoint = Output_Workspace + os.sep + basename + '.shp'; field = "VALUE" arcpy.RasterToPoint_conversion(inRaster,outPoint,field) print "ok"