ium_495719/helper.py

9 lines
247 B
Python
Raw Normal View History

2024-04-27 18:00:53 +02:00
import tensorflow as tf
2024-04-27 18:20:17 +02:00
2024-04-27 18:00:53 +02:00
def prepare_tensors(df):
Y = df["Price"]
X = df.drop("Price", axis=1)
X_tensor = tf.convert_to_tensor(X, dtype=tf.float32)
Y_tensor = tf.convert_to_tensor(Y, dtype=tf.float32)
return X_tensor, Y_tensor