목록Study (151)
Rylah's Study & Daily Life

# 파이썬 패키지 가져오기 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from time import time from keras.models import Sequential from keras.layers import Dense from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split # 하이퍼 파라미터 MY_EPOCH = 500 MY_BATCH = 64 ########## 데이터 준비 #########..

import os import tensorflow as tf os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # 이 코드를 넣어야 작동이 됨 from tensorflow.keras.models import Sequential from tensorflow.keras.layers import LSTM,Dropout,Dense mnist = tf.keras.datasets.mnist # MNIST 4분할 데이터 불러오기 (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data() print('학습용 입력 데이터 모양 : ', x_train.shape) print('학습용 출력 데이터 모양 : ', y_train...
This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 오류 해결은 다음과 같다. 정확하게는 설정에서 뜨지 않게 옵션을 내리는 것이다. 하지만 충분히 테스트가 되므로 끄는것이 속 편하다. import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

#include int main(void) { int num; printf("num? "); scanf("%d", &num); printf("you input number is %d\n", num); return 0; }

#include #include #include #include int main(void) { time_t* cur_time; // 포인터변수만 선언하고 메모리를 참조하지 않고 사용해서 오류 발생 time(cur_time); printf("Current Time = %d\n", (int) *cur_time); return 0; } 수정한 소스 #include #include #include #include int main(void) { time_t* cur_time =(time_t*)malloc(sizeof(time_t)); // 포인터변수만 선언하고 메모리를 참조하지 않고 사용해서 오류 발생 time(cur_time); printf("Current Time = %d\n", (int) *cur_time)..

# 5. 상속 (Inheritance) # 일반 유닛 class Unit: def __init__(self, name, hp): # 클래스 생성자 self.name = name self.hp = hp # 공격 유닛 class AttackUnit(Unit): def __init__(self, name, hp, damage): Unit.__init__(self, name, hp) self.damage = damage def attack(self, location): print(f"{self.name} : {location} 방향으로 적군을 공격합니다. [공격력 : {self.damage}]") def damaged(self, damage): print(f"{self.name} : {damage} 데미지를 입..

# 1. 클래스 # 마린 : 공격 유닛 , 군인, 총을 쏠 수 있음 name = "마린" # 유닛의 이름 hp = 40 # 유닛의 체력 damage = 5 # 유닛의 공격력 print(f"{name} 유닛이 생성되었습니다.") print(f"체력 {hp}, 공격력 {damage}\n") # 탱크 : 공격 유닛, 탱크, 포를 쏠 수 있는데, 일반 모드 / 시즈 모드 tank_name = "탱크" tank_hp = 150 tank_damage = 35 print(f"{tank_name} 유닛이 생성되었습니다.") print(f"체력 {tank_hp}, 공격력 {tank_damage}\n") tank2_name = "탱크" tank2_hp = 150 tank2_damage = 35 print(f"{tank2_..

# 1. 표준 입출력 print("Python", "Java", sep=", ") print("Python", "Java", "JavaScript", sep=" vs ") print() print("Python", "Java", sep=",")#, end="?") print(" 무엇이 더 재밌을까요?") print("Python", "Java", sep=",", end="?") # end 부분의 default = \n end 변경 가능 print(" 무엇이 더 재밌을까요?") import sys print("Python", "Java", file=sys.stdout) # stdout print("Python", "Java", file=sys.stderr) # stderr (에러 처리) print() #시..