일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 세계대전
- opencv
- 블록체인
- img
- 세계사
- keras
- qtdesigner
- DataSet
- 유가 급등
- Python
- Training
- Inference
- pyqt
- cv2
- Perceptron
- 딥러닝
- terminal
- numpy
- 브렉시트
- TFRecord
- deeplearning
- dtype
- 퍼셉트론
- error
- itksnap
- TensorFlow
- 유로화
- loss
- TF
- 비트코인
- Today
- Total
목록Python (50)
활연개랑
_, bi_binary = cv2.threshold(roi_1, 0, 255, cv2.THRESH_BINARY) contours, hierarchy = cv2.findContours(bi_binary, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE) findcontours를 하기 위해 위 코드를 실행하는 과정에서 다음과 같은 오류가 발생하였습니다. cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/contours.cpp:195: error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1 images when mode..
다음 에러는 matplotlib에서 GUI 창에 plot을 띄우려고 하는데, GUI를 띄우기위한 plot 파이썬 모듈이 없을 때 나타납니다. UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. plt.show() 따라서, Qt5Agg, GTKAgg, Qt4Agg, 또는 pyqt5를 설치해서 다음과 같은 오류를 해결할 수 있습니다.
tfrecord를 만들 때 발생하는 에러 TypeError: Input 'bytes' of 'DecodeRaw' Op has type int64 that does not match expected type of string. parsing하는 과정에서 label parsing을 다음과 같이 했을 때 위 오류가 발생했다. label = tf.io.decode_raw(features['train/label'], tf.int64) label = tf.cast(label, tf.int64) 하지만, label에서는 decode_raw를 사용할 필요 없이 label = features['train/label'] 이렇게만 작성해주면 된다.
아무도 모르시겠지만 되게 오랜만이죠 ㅎㅎ 제가 취업을했어요 축하해주세요. 그래서 앞으로 글을 많이 올리진 못할 것 같지만 종종 올리도록 하겠습니다. ValueError: cannot resize this array: it does not own its data 이미지 resize를 할 때 이런 오류가 난다면 아마도 img.resize(size,size)
channel3_img = np.repeat(channel1_img[:,:,np.newaxis],3,-1) 이렇게 1층씩 3개 쌓아주시면 됩니다
np.dot(a,b)를 연산할경우, a,b가 0차원 scalar이면 a와 b의 곱셈으로 연산된다. a,b가 1차원 array면, 두 벡터의 내적이 연산된다. a,b가 2차원 array이면 행렬곱으로 연산된다. (=np.matmul) 딥러닝 신경망에서 np.dot()을 활용하여 행렬의 곱으로 신경망 연산을 하는 경우가 있다. np.dot (1차원 내적연산)은 다음과 같이 활용할 수 있다. import numpy as np a= np.array([-5,3,2,8]) b= np.array([1,2,-1,0]) y= np.dot(a,b) print(y) out: -1 이 된다. np.dot을 사용해 두 벡터의 내적을 계산할 경우, 연산이 어떻게 이루어지는지 알아보자. -5*1 + 3*2 + 2*-1 + 8*0 ..
df에서 en이라는 컬럼에 a가 들어간는 행 추출 df[df['en'].str.contains('a')] df.query('en.str.contains("a")') 여러 단어중 하나라도 들어가는 행 추출 df[df['en'].str.contains('a|b|c')] # 안될경우 engine='python'추가 여러단어 모두 들어가는 행 추출 words = ['a', 'b','c] df[df['en'].map(lambda x: all(word in x for word in words))]