I am a physics student living in Korea. Please forgive me even if my English is weird
I want to deep-learn data in the form of exponential functions for the task, but it doesn’t seem
to be properly learned. I’ve tried changing the activation function or trying various things, but it’s my first time learning Python, so it hasn’t been solved at all.
# 딥러닝을 구동하는 데 필요한 케라스 함수 호출
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
# 필요한 라이브러리 불러오기
import numpy as np
import tensorflow as tf
# 실행할 때마다 같은 결과를 출력하기 위해 설정하는 부분
np.random.seed(3)
tf.random.set_seed(3)
# 준비된 수술 환자 데이터를 불러오기
Data_set = np.loadtxt("size.csv", delimiter = ",")
# 환자의 기록과 수술 결과를 X와 Y로 구분하여 저장
X = Data_set[:,0]
Y = Data_set[:,1]
print(X)
print(Y)
enter image description here
I think there’s a problem with the model part, but I don’t know how to make the right model.
Is there anyone who can solve this problem?
# 딥러닝 구조를 결정 (모델을 설정하고 실행)
model = Sequential()
model.add(Dense(30, input_dim = 1, activation = 'relu'))
model.add(Dense(1, activation = 'sigmoid'))
# 딥러닝 실행
model.compile(loss = 'mean_squared_error', optimizer = 'adam', metrics = ['accuracy'])
model.fit(X, Y, epochs = 100, batch_size = 10)```
enter image description here
박영준 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.