python

· Error
Blas SGEMM launch failed issue tf.import\_graph\_def 함수를 사용하였는데, InternalError:Blas SGEMM launch failed issue 가 발생하였다. 이 문제는 이미 작동중인 GPU 할당에 관한 문제였는데, 주요 해결 방법으로 gpu_option에서 allow_grouth=True를 설정하는 방법 config.allow\_soft\_placement = True config.log\_device\_placement = True 를 설정하는 방법이 나왔지만 효과가 없었다. gpu_options = tf.GPUOptions(allow_growth = True) config = tf.ConfigProto(gpu_options=gpu_options)..
첫번째, 다음의 홈페이지를 방문하여 읽어본다. numpy. xxx 설명 페이지 두번째, 위 페이지를 읽고 작성한 나의 코드는 다음과 같다. # 평균과 표준편차는 채널별로 구해줍니다. x_mean = np.mean(x_train, axis=(0, 1, 2)) x_mean_dft = np.mean(x_train) x_mean_0 = np.mean(x_train, axis=0) x_mean_1 = np.mean(x_train, axis=1) x_mean_2 = np.mean(x_train, axis=2) x_mean_3 = np.mean(x_train, axis=3) x_mean_01 = np.mean(x_train, axis=(0, 1)) x_mean_02 = np.mean(x_train, axis=(0, ..
· Error
Pycharm에서 패키지 생성시 실수로 ch05 의 하위 폴더에 ch06을 생성하였다. 그래서 마우스로 firstProject 폴더로 ch06 을 꺼내어 refactor한 뒤, tensorflow 실행을 할 때부터 ModuleNotFoundError이 발생하는 것이었다. ch06 폴더를 디렉토리에서 삭제한 뒤, firstProject하위에 ch06을 다시 생성하여, 에러가 났던 동일한 코드를 재실행하니 실행이 되었다. Pycharm의 refactoring 과정에서 생긴 보이지 않는 오류인 듯 하다.
1. 데이터 가져오기 이미지 데이터셋 가져오기 import pandas as pd DATA_PATH = '../../clothes_dataset' train_df = pd.read_csv(DATA_PATH + '/clothes_classification_train.csv') val_df = pd.read_csv(DATA_PATH + '/clothes_classification_val.csv') test_df = pd.read_csv(DATA_PATH + '/clothes_classification_test.csv') print(train_df.head()) 2. 이미지 제너레이터 정의 및 모델 구상하기 이미지 제너레이터 정의 # 이미지 제너레이터를 정의합니다. train_datagen = ImageDat..
Codezoy
'python' 태그의 글 목록