1. ctrl + shipft +p => Go:Install/Update Tools => 전체 설치

 

2. settins.json을 아래와 같이 설정

'[Go]' 카테고리의 다른 글

time.Time 에서 minute 빼기  (0) 2021.03.05
Binary Dump  (0) 2021.03.05
Posted by 회색세계

0. Import

import tensorflow as tf
from tensorflow import keras
from keras.layers import Dense
from keras.models import Sequential

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings 
from IPython.display import Image

warnings.filterwarnings('ignore')
%matplotlib inline

SEED = 34

1.  mnist 데이터 살펴보기

mnist = keras.datasets.mnist
((train_images, train_labels), (test_images, test_labels)) = mnist.load_data()

2. 데이터의 shape을 출력

print(f"train_imgaes: {train_images.shape}")
print(f"train_labels: {train_labels.shape}")

print(f"test_imgaes: {test_images.shape}")
print(f"test_labels: {test_labels.shape}")

3. (28, 28) 형태의 이미지를 plt을 이용하여 출력

plt.figure()
plt.imshow(train_images[0])
plt.colorbar()
plt.grid()
plt.show()
print(train_labels[0])

4. train_images에서 0이 아닌 값들을 출력

print(list(filter(lambda x: x != 0 , train_images[0].reshape(-1)))[:10])

5. train_images의 dtype을 출력

print(train_images.dtype)
print(train_labels.dtype)
print(test_images.dtype)
print(test_labels.dtype)

6. train/test 이미지 데이터의 범위 확인

print(list(filter(lambda x: x != 0, train_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, train_labels.reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_labels.reshape(-1)))[:10])

7. train/test 이미지 데이터의 최소/최대값을 출력

print(max(train_images.reshape(-1)), min(train_images.reshape(-1)))
print(max(test_images.reshape(-1)), min(test_images.reshape(-1)))

8. 정수형을 실수형으로 변경 후 dtype으로 비교

train_images = train_images.astype(np.float64)
test_images = test_images.astype(np.float64)

9. 데이터 0-1 노말라이즈 수행

train_images = train_images / 255
test_images = test_images / 255

10. 0-1 노말라이즈 후 데이터의 값이 변경되었는지 문제 6, 7의 방법을 이용하여 확인

print(list(filter(lambda x: x != 0, train_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, train_labels.reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_labels.reshape(-1)))[:10])
print(train_images.shape, train_labels.shape, test_images.shape, test_labels.shape)
print(train_images.dtype, train_labels.dtype, test_images.dtype, test_labels.dtype)
Posted by 회색세계

ymdHM := "202006011522"

ts_ := time.Parse("200601021504", ymdHM)

min := time.Duration(-ts.Minute() / 10) * time.Minute

new := ts.Add(min)

fmt.Println(new)

'[Go]' 카테고리의 다른 글

vscode에서 golang 자동완성이 안될 때  (0) 2021.07.15
Binary Dump  (0) 2021.03.05
Posted by 회색세계

2021. 3. 5. 09:42 [Go]

Binary Dump

f, _ := os.Create(path)

binary.Write(f, binary.LittleEndian, binary_data)

'[Go]' 카테고리의 다른 글

vscode에서 golang 자동완성이 안될 때  (0) 2021.07.15
time.Time 에서 minute 빼기  (0) 2021.03.05
Posted by 회색세계

.symfix path(C:\tmp) : 심볼 다운로드 경로 지정.

 

.reload : 심볼 로드.

 

k : 스택 트레이스의 정확성 여부 확인.

 

.logopen path(c:\temp\a.log) : console 로그저장.

 

.logclose : 로그파일 닫음.

 

lmv : 모듈 정보 

 

lmt: 모듈 목록 및 타임스태프 

 

!lmi address : 세부 모듈 정보 

 

dc address L100 : address의 100byte를 덤프.

 

!dh address : PE 헤더 덤프.

 

!dh -i address : IMAGE_IMPORT_DESCRIPTOR.

 

!address : 메모리 맵

 

!address -summary : 메모리 맵 요약

 

dps address L100/8 : 32bit, 64bit 환경에 맞게 메모리를 보여줌.

 

u address : address 이후의 assembly 코드를 보여줌.

 

ub address : address 이전의 assembly 코드를 보여줌.

 

!chkimg -v -d PE_PATH : PE파일의 무결성 검사.

 

.exepath+ path : 파일을 찾기 위해 경로를 명시해줌

Posted by 회색세계

2020. 4. 4. 15:10 [Git]

Git 명령어 모음.

Source Tree 사용

 

clone: 원격 저장소를 로컬에 복사.

 

add: 로컬에서 작업한 파일들을 스테이지에 추가

 

commit: 스테이지에 올라온 파일들을 로컬에 저장.

 

push: commit된 것들을 원격 저장소에 업로드.

 

checkout(코드 뭉치 버리기): 마지막 커밋으로 돌아감.

 

branch: 기능 변경을 하고 싶을 때 생성 및 사용

 

merge: 한 브랜치의 내용을 다른 브랜치에 반영

Posted by 회색세계
이전버튼 1 2 이전버튼

블로그 이미지
회색세계

공지사항

Yesterday
Today
Total

달력

 « |  » 2025.8
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

최근에 올라온 글

최근에 달린 댓글

글 보관함