Keras fue absorbida por TensorFlow ( tf.keras ), pero conserva su filosofía minimalista. Con Keras, puedes construir una red neuronal profunda con 5 líneas de código.
Here is a structure and a draft for a technical paper titled aprende machine learning con scikitlearn keras y tensorflow
import tensorflow as tf from tensorflow.keras import layers, models # 1. Cargar y normalizar el dataset MNIST mnist = tf.keras.datasets.mnist (X_train, y_train), (X_test, y_test) = mnist.load_data() X_train, X_test = X_train / 255.0, X_test / 255.0 # 2. Construir la arquitectura de la red neuronal model = models.Sequential([ layers.Flatten(input_shape=(28, 28)), # Aplana la imagen de 2D a 1D layers.Dense(128, activation='relu'), # Capa oculta con activación ReLU layers.Dropout(0.2), # Evita el sobreajuste apagando neuronas al azar layers.Dense(10, activation='softmax') # Capa de salida para 10 clases (dígitos 0-9) ]) # 3. Compilar el modelo model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) # 4. Entrenar la red neuronal model.fit(X_train, y_train, epochs=5, batch_size=32) # 5. Evaluar el rendimiento en datos nuevos test_loss, test_acc = model.evaluate(X_test, y_test, verbose=2) print(f"\nPrecisión en el conjunto de prueba: test_acc * 100:.2f%") Use code with caution. 4. Fase 3: Personalización Avanzada con TensorFlow Keras fue absorbida por TensorFlow ( tf
Casi cualquier proyecto en Scikit-Learn sigue estos cinco pasos estructurados: Cargar y normalizar el dataset MNIST mnist = tf
Un tensor es la unidad fundamental de datos en TensorFlow. Es similar a un arreglo multidimensional de NumPy, pero con la capacidad de ejecutarse en aceleradores de hardware como GPUs. Gradientes automáticos ( tf.GradientTape )
: Una opción de 27 horas para aprender conceptos teóricos mientras te desplazas, disponible por $32.20 en Audible .
She pressed run. The computer whirred for a second. Then, she asked the model to predict the elevator’s behavior on a rainy Thursday with three passengers and a "ding-malfunction" logged at 3 PM.
| Ваше имя |
| Телефон |
| Вопрос или комментарий |
|
|