Regression से Multi-class Classification तक
Binary classification, multi-class classification और regression के लिए जो मॉडल आपने देखे हैं, वे मूल रूप से एक जैसे ही रहे हैं, बस मॉडल में कुछ छोटे बदलाव किए गए थे.
एक regression मॉडल बनाना शुरू करें, और फिर मॉडल में बदलाव करके उसे multi-class classification करवाएँ.
यह अभ्यास पाठ्यक्रम का हिस्सा है
PyTorch के साथ Deep Learning परिचय
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
import torch
import torch.nn as nn
input_tensor = torch.Tensor([[3, 4, 6, 7, 10, 12, 2, 3, 6, 8, 9]])
# Implement a neural network with exactly four linear layers
model = nn.____(
____
)
output = model(input_tensor)
print(output)