https://github.com/terryum/awesome-deep-learning-papers



'Cat.Storage > SubCat.Research' 카테고리의 다른 글

Likert Scale  (0) 2016.08.16
Two-alternative forced choice  (0) 2016.08.16
Nearest Neighbor Search  (0) 2016.02.16
ISO preference curves  (1) 2015.10.27
DCT versus DFT/KLT  (0) 2015.10.22
Posted by Cat.IanKang
,

#include <iostream>

#include <stdlib.h> 

#include <fstream>

#include <stdio.h>



int main()

{

//initializer

float container[4096]; //16*16*4*4

for (int i = 0; i < 1024; ++i)

{

container[i * 4] = 0.1f;

container[i * 4 + 1] = 0.05f;

container[i * 4 + 2] = 0.025f;

container[i * 4 + 3] = 0.0125f;

}

std::fstream file;

file = std::fstream("file.bin", std::ios::out | std::ios::binary);

for (int i = 0; i < 32; ++i)

{

file.write((char*)&container, 4096*sizeof(float));

}

file.close();


std::fstream reader("file.bin", std::ios::binary | std::ios::in);

if (!reader)

{

return 0;

}

float containerR[4096];

reader.read((char*)&containerR, 4096 * sizeof(float));


}


//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//wstring version


#include <iostream>

#include <stdlib.h> 

#include <fstream>

#include <stdio.h>

#include <Windows.h>

#include <vector>


int main()

{

const int patchNum = 1024;

const int arrSize = 4096;

float container[arrSize]; //16*16*4*4

float containerRR[arrSize]; //16*16*4*4

std::vector<float> containerR; //16*16*4*4

containerR.resize(arrSize);


for (int i = 0; i < arrSize / 4; ++i)

{


container[i * 4] = 0.1f;

container[i * 4 + 1] = 0.05f;

container[i * 4 + 2] = 0.025f;

container[i * 4 + 3] = 0.0125f;

}


//initializer

for (int allNum = 0; allNum < patchNum; ++allNum)

{

WCHAR fileDest[260];

wsprintfW(fileDest, L"C:\\TerrainData\\moon_32x32\\mass_%02d\\weights.bin", allNum);

std::ofstream outFile;

outFile = std::ofstream(fileDest, std::ios::binary);

outFile.write((char*)&container, arrSize * sizeof(float));

outFile.close();

}


//WCHAR filename[260];

//wsprintfW(filename, L"C:\\TerrainData\\moon_32x32\\mass_00\\weight.bin");

//std::ifstream ampFile(filename, std::ios::binary);

//

//

////patch->ampSetTable.reserve(ampArrSize); //The number of weights. 

//ampFile.seekg(0, std::ios::end);

//std::streampos fileSize = ampFile.tellg();

//ampFile.seekg(0, std::ios::beg);

//

//ampFile.read((char*)&containerR[0], fileSize);

//ampFile.read((char*)&containerRR, arrSize* sizeof(float));

//

//ampFile.close();

}

Posted by Cat.IanKang
,

http://sci-hub.io/


When you enter a kind of paper information 'eg. DOI information', you can access the paper for free.


It's really awesome '-'


(* it is on suing in U.S. I heard)

Posted by Cat.IanKang
,


This code contains many options related to tabular. 


\arraystretch sets the space between each row. 

\tabcolsep sets the space between each column. 

\hskip sets the space for specific column.

\hline inserts new black line. 

\multicolumn makes possible to write down something into multiple column. 


\colorbox{lightgray}{

\renewcommand{\arraystretch}{1.0}

\renewcommand\tabcolsep{2pt}

\begin{tabular}{l l @{\hskip 1pt}l}


\hline

EGLSurface & eglCreatePbufferSurface (& EGLDisplay display,\\

& & EGLConfig config,\\

& & const EGLint *attribList) \\

\hline

display & \multicolumn{2}{l}{specifies the EGL display connection} \\

config & \multicolumn{2}{l}{specifies the configuration} \\

attribList & \multicolumn{2}{l}{specifies the list of pixel buffer attributes; may be NULL} \\

\end{tabular}


}




'Cat.Storage > SubCat.Latex' 카테고리의 다른 글

[Latex] Local Font Change  (0) 2016.02.15
Posted by Cat.IanKang
,

1. Introduction 


 Nearest neighbor search (NNS), also known as proximity search, similarity search or closest point search, is an optimization problem for finding closest (or most similar) points. Closeness (similarity) is typically expressed in terms of a dissimilarity function: the less similar the target, the larger the function values. The nearest-neighbor (NN) search problem is formally defined as follows: given a set S of points in a space M and a query point q∈M, find the closest point in S to qMost commonly M is a metric space and dissimilarity is expressed as a distance metric, which is symmetric and satisfies the triangle inequality. Even more common, M is taken to be the d-dimensional vector space where dissimilarity is measured using the Euclidean distance, Manhattan distance or other distance metric. However, the dissimilarity function can be arbitrary. 



2. Methods


  Various solution to the NNS problem have been proposed. The quality and usefulness of the algorithms are determined by the time complexity of queries as well as the space complexity of any search data structures that must be maintained. The informal observation usually referred to as the curse of dimensionality states that there is no general-purpose solution for NNS in high-dimensional Euclidean space using polynomial preprocessing and polylogarithmic search time. 


  1) Linear search


   Computing the distance from the query point to every other point in the database is the simplest solution to the NNS problem. We sometimes call it as the naive approach, has a running time of O(dN) where N is the cardinality of S and d is the dimensionality of M. Since there are no search data structures to maintain, the linear search has no space complexity beyond the storage of the database. 


   2) 

'Cat.Storage > SubCat.Research' 카테고리의 다른 글

Two-alternative forced choice  (0) 2016.08.16
Depp Learning Surveys  (0) 2016.06.04
ISO preference curves  (1) 2015.10.27
DCT versus DFT/KLT  (0) 2015.10.22
Expressions for Paper  (0) 2015.09.02
Posted by Cat.IanKang
,


This posting shows the way to change the font 'Times' to 'Helvetica' in local. (not global setting)


First,  load package. 


\usepackage[scaled=1.0]{helvet} 


If you do not want to change the size of font, use below. 


\usepackage {helvet} 




Then, use following command. 


\fontfamily{phv}\selectfont{} 


(ex. \fontfamily{phv}\selectfont{Some thing you want to talk about} )



I use above example into algorithm box. Followings are sample code and its result.


\usepackage{algorithm}

\usepackage{algpseudocode}

\usepackage[scaled=1.0]{helvet} 



\floatname{algorithm}{\large sample code}

\begin{algorithm}[htb]

 

\caption{Overall procedure}

 

\label{alg:Algorithm}

 

\begin{algorithmic}[1]

\fontfamily{phv}\selectfont{}

\State \#version 300 es \hspace{0.5cm} // This indicates SL version 3.0.

\State

\State uniform mat4 worldViewProjection; \hspace{0.5cm} // 4x4 matrix

\State

\State layout(location = 0) in vec3 position;

 

\State layout(location = 1) in vec3 normal;

 

\State layout(location = 2) in vec2 texCoord;

\State

\State out vec3 v\_normal;

 

\State out vec2 v\_texCoord;

\State

\State void main() \{

 

\State \hspace{0.2cm} gl\_Position = worldViewProjection * vec4(position, 1.0);

 

\State \hspace{0.2cm} v\_normal = normal;

 

\State \hspace{0.2cm} v\_texCoord = texCoord;

 

\State \}

 

 

\end{algorithmic}

 

\end{algorithm} 




'Cat.Storage > SubCat.Latex' 카테고리의 다른 글

[Latex] Table Setting (arrystretch, tabcolsep, hskip)  (0) 2016.02.16
Posted by Cat.IanKang
,

ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476485(v=vs.85).aspx

ref2: https://msdn.microsoft.com/en-us/library/windows/desktop/dn508285(v=vs.85).aspx



In my case, I'd forgot to call 'unmap' method before called 'draw' method.


ID3D11DeviceContext::Unmap method: 

Invalidate the pointer to a resource and reenable the GPU's access to that resource.

Posted by Cat.IanKang
,

Since the render target view (that views the texture to render into) and depth stencil view (the corresponding depth buffer) have different multi-sampling settings, above error message have been shown. 


When using multi-sampling, every pixel needs to store extra data for the sub-samples. Each texture resource is prepared for one certain multi-sampling setting and to make them work together, both the color texture and the depth buffer (after all, it’s just another texture) need the same setting. You can have resources with different settings, but you can only bind them together, if their settings coincide.



Example code) 



HRESULT hr = S_OK;

// Setup the render target texture description.

D3D11_TEXTURE2D_DESC rtTextureDesc;

rtTextureDesc.Width = 1280;

rtTextureDesc.Height = 960;

rtTextureDesc.MipLevels = 1;

rtTextureDesc.ArraySize = 1;

rtTextureDesc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;

rtTextureDesc.SampleDesc.Count = 1;

rtTextureDesc.SampleDesc.Quality = 0;

rtTextureDesc.Usage = D3D11_USAGE_DEFAULT;

rtTextureDesc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;

rtTextureDesc.CPUAccessFlags = 0;

rtTextureDesc.MiscFlags = 0;


// Create the render target texture.

V_RETURN(pd3dDevice->CreateTexture2D(&rtTextureDesc, NULL, &m_renderTargetTexture));


// Setup the description of the render target view.

D3D11_RENDER_TARGET_VIEW_DESC renderTargetViewDesc;

renderTargetViewDesc.Format = rtTextureDesc.Format;

renderTargetViewDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;

renderTargetViewDesc.Texture2D.MipSlice = 0;


// Create the render target view.

V_RETURN(pd3dDevice->CreateRenderTargetView(m_renderTargetTexture, &renderTargetViewDesc, &m_renderTargetView));


//Setup the depth stencil texture description. 

D3D11_TEXTURE2D_DESC dsTextureDesc;

dsTextureDesc.Width = 1280;

dsTextureDesc.Height = 960;

dsTextureDesc.MipLevels = 1;

dsTextureDesc.ArraySize = 1;

dsTextureDesc.SampleDesc.Count = 1;

dsTextureDesc.SampleDesc.Quality = 0;

dsTextureDesc.Format = DXGI_FORMAT_D32_FLOAT;

dsTextureDesc.Usage = D3D11_USAGE_DEFAULT;

dsTextureDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL;

dsTextureDesc.CPUAccessFlags = 0;

dsTextureDesc.MiscFlags = 0;

V_RETURN(pd3dDevice->CreateTexture2D(&dsTextureDesc, NULL, &m_depthTexture));


// Create the depth stencil view

D3D11_DEPTH_STENCIL_VIEW_DESC DescDS;

DescDS.Format = dsTextureDesc.Format;

DescDS.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;

DescDS.Texture2D.MipSlice = 0;

DescDS.Flags = NULL;

V_RETURN(pd3dDevice->CreateDepthStencilView(m_depthTexture, &DescDS, &m_depthView));


pd3dImmediateContext->OMSetRenderTargets(1, &m_renderTargetView, m_depthView);

return hr;

Posted by Cat.IanKang
,