लर्निंग कर्व्स प्लॉट करें
लर्निंग के दौरान, मॉडल हर epoch पर इवैल्यूएट किए गए loss फ़ंक्शन को स्टोर करता है. लर्निंग कर्व्स देखने से हमें लर्निंग प्रोसेस के बारे में काफी कुछ पता चलता है. इस अभ्यास में, आप उस मॉडल के लिए ट्रेनिंग और वेलिडेशन लॉस कर्व्स प्लॉट करेंगे जिसे आप ट्रेन करेंगे.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Keras के साथ Image Modeling
अभ्यास निर्देश
- मॉडल को ट्रेनिंग डेटा (
train_data) पर फिट करें. - 20% वेलिडेशन स्प्लिट, 3 epochs और batch size 10 का उपयोग करें.
- ट्रेनिंग लॉस प्लॉट करें.
- वेलिडेशन लॉस प्लॉट करें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
import matplotlib.pyplot as plt
# Train the model and store the training object
training = ____
# Extract the history from the training object
history = training.____
# Plot the training loss
plt.plot(history[____])
# Plot the validation loss
plt.plot(history[____])
# Show the figure
plt.show()