Nikhil Bhagat

Nikhil Bhagat I am ambitious and driven. I thrive on challenge and constantly set goals for myself, so I have some

18/01/2025

Teaching My AI the Nepali Way๐Ÿค–: Chaos, Momo, and Everything in Between

Training ML Model..?? Itโ€™s like teaching a kid to separate momos ๐Ÿฒ from samosas and chowmein ๐Ÿœ. Here's how I trained my โ€œNepali kidโ€ AI with CIFAR-10 Dataset. Buckle up, itโ€™s chaotic, like Kathmandu traffic.!! ๐Ÿšฆ

1. Data Prep: Tarkari Pasal Style ๐Ÿ›’
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0
Normalising data = washing tarkari before cooking. Clean data = better model! ๐Ÿฅฆ

2. Building Dimaag ๐Ÿง : Nepali Thali
def create_model():
model = models.Sequential([
layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)),
layers.MaxPooling2D((2, 2)),
layers.Flatten(),
layers.Dense(64, activation='relu'),
layers.Dense(10, activation='softmax')
])
return model
Conv2D = rice ๐Ÿš, MaxPooling = achar ๐Ÿฅ’, Dense = tarkari. Nepali AI thali!

3. Data Augmentation: Gym for AI ๐Ÿ‹๏ธ
data_augmentation = tf.keras.Sequential([
layers.RandomFlip("horizontal"),
layers.RandomRotation(0.1),
layers.RandomZoom(0.1)
])
Augmentation = teaching AI chaos. Like finding roadblocks on the way to Thamel.
In a Hauba Way : AI learns to recognise a dai in daura suruwal or jeans. Nepali versatility at its best.!! ๐ŸŽ‰

4. Training: AIโ€™s School Life ๐Ÿ“š
for epoch in range(epochs):
for step, (x_batch_train, y_batch_train) in enumerate(datagen.flow(x_train, y_train)):
with tf.GradientTape() as tape:
logits = model(x_batch_train, training=True)
loss = loss_fn(y_batch_train, logits)
Training = school. Mistakes.?? Loads. Progress..?? Slow. Sometimes, it blanks out like a kid in class.๐Ÿ˜…

5. Nepali Twist: CutMix๐Ÿ“ธ
def cutmix(image, label):
lam = np.random.beta(1.0, 1.0)
rand_index = np.random.randint(0, x_train.shape[0])
image[bbx1:bbx2, bby1:bby2, :] = x_train[rand_index][bbx1:bbx2, bby1:bby2, :]
return image, lam * label + (1 - lam) * y_train[rand_index]
CutMix is chaos, like mixing momos and chowmein on one plate and asking AI to figure it out. ๐Ÿค”

6. Validation: Nosy Relatives Mode๐ŸŽ“
val_logits = model(x_batch_val, training=False)
val_acc_metric.update_state(y_batch_val, val_logits)
Validation = report card time. If it flops here, it's like scoring 30 after claiming you studied all night. ๐Ÿ‘€

7. Testing: SEE Results ๐Ÿ†
test_loss, test_accuracy = model.evaluate(x_test, y_test)
print(f"Test accuracy: {test_accuracy:.4f}")
Testing AI is like an exam. It nails cats ๐Ÿฑ and planes โœˆ๏ธ, but calls a frog ๐Ÿธ a dog ๐Ÿ•. Classic AI fail.! ๐Ÿ˜‚ Anyone elseโ€™s AI make these funny mistakes.?? Share your fails! ๐Ÿš€

Lessons Learnt
1. Clean Data: Like washing veggies for tarkari, donโ€™t skip it! ๐Ÿฅฆ
2. Embrace Chaos: Augmentation = handling KTM traffic jams. ๐Ÿšฆ
3. Prove It: Validation is like impressing nosy relatives, donโ€™t fail! ๐Ÿ˜‚๐Ÿ‘€

AI is chaos and creativity, like coding during load-shedding with chiya tough but rewarding.

Are you looking to launch your music player mobile app then this flutter music player app will help you to build the app...
16/02/2022

Are you looking to launch your music player mobile app then this flutter music player app will help you to build the app in just days? We offer an online grocery software, ecommerce app etc system.

Flutter Tutorial | Flutter Full Crash Course | Flutter Ecommerce App
Please Like Share & subscribe For This Kind Of Video

Social Links
Facebook : https://www.facebook.com/knewboy.nykhil/
Instagram : https://www.instagram.com/niikhil_bhagat/
Linkedin : https://www.linkedin.com/in/nikhil-bhagat-9547401b5/
Github : https://github.com/NikeGunn

Thank You

Part 2 : https://www.youtube.com/watch?v=zAp1ahSqF3M

08/02/2022

CodeWithNikhil youtube video intro

Address

Biratnagar
Biratnagar

Alerts

Be the first to know and let us send you an email when Nikhil Bhagat posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Nikhil Bhagat:

Share

Category