묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
ValueError
(cv) pi@raspberrypi:~/rbp_dnn $ python3 RBP_DL15_MNIST_PiCamera.py 실행 에러 ------------------------------------------------- /home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/encoders.py:544: PiCameraResolutionRounded: frame size rounded up from 300x300 to 304x304 width, height, fwidth, fheight))) Traceback (most recent call last): File "RBP_DL15_MNIST_PiCamera.py", line 78, in <module> result = model.predict(np.array([num])) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 909, in predict use_multiprocessing=use_multiprocessing) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 462, in predict steps=steps, callbacks=callbacks, **kwargs) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 396, in _model_iteration distribution_strategy=strategy) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 594, in _process_inputs steps=steps) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 2472, in _standardize_user_data exception_prefix='input') File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_utils.py", line 565, in standardize_input_data 'with shape ' + str(data_shape)) ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (1, 28, 28) 에러 어디서 부터 참조해서 해결을 해야 하나요.
-
해결됨Java TPC 실전프로젝트 (Java API 활용)
엑셀 프로그램이 없는 경우
4.12 최신버전으로 다운로드 아래 다운로드 http://commons.apache.org/proper/commons-compress/download_compress.cgi 아래 다운로드https://mvnrepository.com/artifact/org.apache.commons/commons-collections4/4.1 package com.company;import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;import org.apache.poi.hssf.usermodel.HSSFCell;import org.apache.poi.hssf.usermodel.HSSFRow;import org.apache.poi.hssf.usermodel.HSSFSheet;import org.apache.poi.hssf.usermodel.HSSFWorkbook;import org.apache.poi.ss.usermodel.Cell;//import org.apache.poi.ss.usermodel.CellType;import org.apache.poi.ss.usermodel.CellType;import org.apache.poi.ss.usermodel.Row;import org.apache.poi.xssf.usermodel.XSSFCell;import org.apache.poi.xssf.usermodel.XSSFRow;import org.apache.poi.xssf.usermodel.XSSFSheet;import org.apache.poi.xssf.usermodel.XSSFWorkbook;import java.io.FileInputStream;import java.util.Iterator;public class Project03_C { public static void main(String[] args) { String fileName = "cellDataType.xlsx"; try(FileInputStream fis = new FileInputStream(fileName)) {// HSSFWorkbook workbook = new HSSFWorkbook(fis); // xls// HSSFSheet sheet = workbook.getSheetAt(0); // xls XSSFWorkbook workbook = new XSSFWorkbook(fis); // xlsx XSSFSheet sheet = workbook.getSheetAt(0); // xlsx Iterator<Row> rows = sheet.rowIterator(); while (rows.hasNext()) {// HSSFRow row = (HSSFRow) rows.next(); // xls XSSFRow row = (XSSFRow) rows.next(); Iterator<Cell> cells = row.cellIterator(); while (cells.hasNext()) {// HSSFCell cell = (HSSFCell) cells.next(); // xls XSSFCell cell = (XSSFCell) cells.next(); // xlsx CellType type = cell.getCellType(); if(type == CellType.STRING) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = STRING; Value=" + cell.getRichStringCellValue().toString()); } else if(type == CellType.NUMERIC) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = NUMERIC; Value=" + cell.getNumericCellValue()); } else if(type == CellType.BOOLEAN) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = BOOLEAN; Value=" + cell.getBooleanCellValue()); } else if(type == CellType.BLANK) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = BLANK CELL"); } } } } catch (Exception e) { e.printStackTrace(); } }}
-
미해결대세는 쿠버네티스 (초급~중급편)
deployment rollback
안녕하세요. 태민님 Deployment 강좌에서 rollback 명령을 보여주셨는데요. Deployment yaml 에서 버전을 v3 에서 v2 로 수정하여 다시 v2 로 돌아가는 것과 rollback 명령을 통해 v2 로 돌아가는 것의 차이가 무엇인지 궁금합니다.
-
해결됨스프링 기반 REST API 개발
org.hamcrest.Matchers 에서 Junit Test가 실패 하고 있습니다.
java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package 이라는 오류가 발생 하고 잇습니다. 결과 값은 예상한것과 마찬가지로 Body = {"id":1,"name":"Spring","description":"REST API Development with Spring","beginEnrollmentDateTime":"2018-11-23T14:21:00","closeEnrollmentDateTime":"2018-11-24T14:21:00","beginEventDateTime":"2018-11-25T14:21:00","endEventDateTime":"2018-11-26T14:21:00","location":"ê°ë¨ì D2 ì¤íí í©í 리","basePrice":100,"maxPrice":200,"limitOfEnrollment":100,"offline":false,"free":false,"eventStatus":"DRAFT"} 정상적으로 값이 떨어지고 있어서 맞게는 따라간거 같은데... 왜 SecurityException 이 발생 하는지 알수 있을까요? 번역을 돌려보니 서명자정보가 동일한 패키지에 있는 다른 클래스의 서명자 정보와 일치 하지 않습니다, 라고 나오네요.
-
미해결데브옵스(DevOps)를 위한 쿠버네티스 마스터
kubectl run 실행시 문의 사항
kubectl run --image 로 만들 때 실습 동영상을 보면 바로 deployment가 만들어지는데 저 같은 경우는 kubctl run으로 만들면 pod로 만들어 집니다. 그래서 kubectl run --image alpine:3.4 alpine-deploy --dry-run -o yaml > alpine-deploy.yaml 실습을 진행할 때 kind: pod로 만들어지는데 왜 그런지 알 수 있을까요?
-
미해결윤재성의 Bootstrap 4 & 3 Framework Tutorial
오라클 꼭 깔아야하나요?
오라클 무료로 깔기하는데 오라클 인증이 안되서 안되네요 ㅠㅠ 여기서부터 오라클 이클립스 막히네요 -_-;
-
해결됨React로 NodeBird SNS 만들기
싱글태그로 바꿀때 단축키가 있나요?
3분 19초쯤 보면, List 태그에 닫는태그 바로 지우면서 싱글태그로 바꾸시는데, 단축키가 따로 있으신건가요?
-
미해결윤재성의 Bootstrap 4 & 3 Framework Tutorial
맥북에서는 이클립스 설치가 안되네요
무엇인지 경고문구 뜨면서 잘 안되서 저는 예전에 맥용 에스프레소라는 프로그램으로 사용하려고하는데 괜찮을까요?
-
해결됨파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자
shuffle은 굳이 안써도 되는건가요?
sample(users,4) 에서 리스트로 변환된 users의 4개를 랜덤으로 뽑는거니, shuffle(users)는 굳이 쓸 필요 없는 것 맞나요?
-
미해결윤재성의 Java 기반 Android 9.0(pie) App 개발 고급 3단계
리스트 뷰 네트워크 동기 할때 오류 관련 질문 드립니다.
java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes. 요즘 이 오류가 계속 떠서 해결하려고 노력중입니다.구글검색해서 알려주는대로 시도 해봤는데 잘 되지 않네요.가끔씩 저 오류가 떠서 튕기는데 아마도 쓰레드가 동시에 여러개 작동하다 보니 생기는 오류인것 같습니다.혹시 해결방법이 있을까요?
-
미해결윤재성의 Java 기반 Android 9.0(pie) App 개발 기본 1단계
여러개의 다이얼로그 버튼(positive negative 등등)에 리스너 다는것 질문 드립니다.
2개 다이얼로그를 만들었습니다. 그리고 각각 positive,negative 버튼이 있는데요. 이 버튼마다 동작하는 것이 다 다르게 하고 싶습니다. 1번 다이얼로그의 positive 버튼 따로 동작하고 2번 아이얼로그 positive동작 따로 이런식으로요. 그래서 리스너 클래스를 2개 만들었는데요. 중복된다는 생각이 들어서요. 1개의 클래스만 만들어서 분기 할수 있는 방법이 혹시 있는지 질문 드립니다.
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError
# cv2.findCountours() function changed from OpenCV3 to OpenCV4: now it have only two parameters instead of 3 cv2MajorVersion = cv2.__version__.split(".")[0] print('openCV version : ', cv2MajorVersion) # check for contours on thresh if int(cv2MajorVersion) >= 4: contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) else: imageContours, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-9-5caa6544b17f> in <module> 4 # check for contours on thresh 5 if int(cv2MajorVersion) >= 4: ----> 6 contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) 7 else: 8 imageContours, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) NameError: name 'thresh' is not defined
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError: name 'plt' is not defined
# Draw digit image fig = plt.figure() ax = fig.add_subplot(1, 1, 1) # Major ticks every 20, minor ticks every 5 major_ticks = np.arange(0, 29, 5) minor_ticks = np.arange(0, 29, 1) ax.set_xticks(major_ticks) ax.set_xticks(minor_ticks, minor=True) ax.set_yticks(major_ticks) ax.set_yticks(minor_ticks, minor=True) # And a corresponding grid ax.grid(which='both') # Or if you want different settings for the grids: ax.grid(which='minor', alpha=0.2) ax.grid(which='major', alpha=0.5) ax.imshow(x_test[selected_digit], cmap=plt.cm.binary) plt.show()--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-24-1e41385f9397> in <module> 1 # Draw digit image ----> 2 fig = plt.figure() 3 ax = fig.add_subplot(1, 1, 1) 4 5 # Major ticks every 20, minor ticks every 5
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError: name 'model' is not defined
# Show History model.evaluate(x_test, y_test, verbose=2) import matplotlib.pyplot as plt fig, loss_ax = plt.subplots() fig, acc_ax = plt.subplots() loss_ax.plot(history.history['loss'], 'ro', label='train loss') loss_ax.plot(history.history['val_loss'], 'r:', label='val loss') loss_ax.set_xlabel('epoch') loss_ax.set_ylabel('loss') loss_ax.legend(loc='upper left') acc_ax.plot(history.history['accuracy'], 'bo', label='train accuracy') acc_ax.plot(history.history['val_accuracy'], 'b:', label='val accuracy') acc_ax.set_ylabel('accuracy') acc_ax.legend(loc='upper left') plt.show() --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-22-ba2619a0447f> in <module> 1 # Show History ----> 2 model.evaluate(x_test, y_test, verbose=2) 3 4 import matplotlib.pyplot as plt 5 NameError: name 'model' is not defined
-
Vue.js 시작하기 - Age of Vue.js
vue cli 설치 error 질문입니다
삭제된 글입니다
-
미해결자바 프로그래밍 입문 강좌 (renew ver.) - 초보부터 개발자 취업까지!!
업데이트를 하고 나서 이클립스가 실행이 안되는데 어떻게 해야 할까여??
이것때문에 아예 열리지 않아요ㅜㅜㅜ
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError
# convert class vectors to binary class matrices y_train = tf.keras.utils.to_categorical(y_train, num_classes) y_test = tf.keras.utils.to_categorical(y_test, num_classes) --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-17-1f535d7b0dc0> in <module> 1 # convert class vectors to binary class matrices ----> 2 y_train = tf.keras.utils.to_categorical(y_train, num_classes) 3 y_test = tf.keras.utils.to_categorical(y_test, num_classes) NameError: name 'num_classes' is not defined
-
미해결React로 NodeBird SNS 만들기
미들웨어 이렇게 추가하는거 맞나요..??
middleware.js exports.postExist = async(req,res,next)=>{ const post = await db.Post.findOne({ where: { id: req.params.id } }); if (!post) { return res.status(404).send("해당 페이지가 존재하지 않습니다"); } next(); } post.js router.delete('/:id', isLoggedIn, postExist, async(req,res,next)=>{ try{ await db.Post.destroy({ where: {id: req.params.id}}); res.send(req.params.id); }catch(e){ console.error(e); next(e); } }) next()만 추가해서 다음 동작으로 갈수있게 해주었는데 더 추가할게 있는지 궁금합니다..!
-
해결됨React로 NodeBird SNS 만들기
더미데이터는 보통 한곳에 만드나요?
예를 들면 상위 컴포넌트에 사용할 dummy 데이터를 한번에 만들어서 각 컴포넌트의 props로 불러들이는게 나은지, 아니면 각 컴포넌트들 마다 필요한 dummy를 만드는게 나은건지, 둘다 상관은 없지만 주로 어떻게 하시는지 궁금합니다.
-
미해결[2026년 출제기준] 웹디자인개발기능사 실기시험 완벽 가이드
border랑 solid 기능
8. css 자손 선택자 vs 자식선택자, 부모요소 vs 자식요소 강에서 border : 1px solid red ; 값을 다 주었는데 실시간 미리보기에서 박스 테투리가 안뜨고 data-brackets-id='751' data-brackets-id='753' < data-brackets-id='754'/div> data-brackets-id='755' 이렇게만 뜨는데 뭐가 오류인가요? [제가 준 브라켓 값입니다.] <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>자손vs자식</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class = "box"> <div> <div></div> </div> </div> </body> ------------------------------------------------------- .box { border: 1px solid red; width : 600px; height: 200px; } . box > div{ border: 1px solid blue; width: 300px; height : 100px; } .box > div div{ border: 1px solid green; width: 100px; height : 100px; background-color : #4524 }