<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

@tensorflow/tfjs-node kutubxonasidan foydalanib tsda bitta raqamni qabul qiladigan va softmaxdan keyin 2 raqamni qabul qiladigan modelni yarating.<|eot_id|><|start_header_id|>assistant<|end_header_id|>

import * as tf from '@tensorflow/tfjs-node'; // Kirish tensori o'lchamini qabul qilamiz (batchSize = 1, inputSize = 1) inputShape = [1, 1]; // Kirish tensori o'lchamini qabul qilamiz const model = tf.sequential(); model.add(tf.layers.dense{ units: 2, // Kirish neyronlari soni inputShape: inputShape, // Kirish tensori o'lchami activation:'softmax' // Aktivatsiya funksiyasi }) //); Modelni to'plash { optimizer:'sgd', loss: 'categoricalCrossentropy', metrics: ['accuracy'] } //); Kirish tensori o'lchamini qabul qilamiz input = tf.tensord2[5], inputShape; // Kirish<|eot_id|>