Machine learning Interview
ИИ, Rust, вайбкодинг, Data Science, Deep Learning и делюсь тем, что интересно и полезно! Вопросы - @workakkk РКН: clck.ru/3FmwRz
Show more📈 Analytical overview of Telegram channel Machine learning Interview
Channel Machine learning Interview (@machinelearning_interview) in the Russian language segment is an active participant. Currently, the community unites 30 574 subscribers, ranking 4 354 in the Technologies & Applications category and 20 917 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 30 574 subscribers.
According to the latest data from 05 November, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by 253 over the last 30 days and by -2 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 10.98%. Within the first 24 hours after publication, content typically collects 7.11% reactions from the total number of subscribers.
- Post reach: On average, each post receives 3 357 views. Within the first day, a publication typically gains 2 174 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 20.
- Thematic interests: Content is focused on key topics such as claude, llm, контекст, hermes, nvidia.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“ИИ, Rust, вайбкодинг, Data Science, Deep Learning и делюсь тем, что интересно и полезно!
Вопросы - @workakkk
РКН: clck.ru/3FmwRz”
Thanks to the high frequency of updates (latest data received on 06 November, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
class BankAccount:
def __init__(self, account_number: int, balance: float):
self.account_number = account_number
self.balance = balance
def deposit_money(self, amount: float):
self.balance += amount
def withdraw_money(self, amount: float):
if amount > self.balance:
raise ValueError("Unfortunately your balance is insufficient for any withdrawals right now ... ")
self.balance -= amount
def print_balance(self):
print(f'Account no: {self.account_number}, Balance: {self.balance} ')
def change_account_number(self, new_account_number: int):
self.account_number = new_account_number
print(f'Your account number has changed to "{self.account_number}" ')
Принцип нарушается, поскольку классом BankAccount контролируется больше одной задачи, связанной с банковскими счетами: управление профилями счетов и управление денежными средствами.
б) соблюдение принципа:
А вот пример соблюдения принципа:
class DepositManager:
def deposit_money(self, account, amount):
account.balance += amount
class WithdrawalManager:
def withdraw_money(self, account, amount):
if amount > account.balance:
raise ValueError("Unfortunately your balance is insufficient for any withdrawals right now ... ")
account.balance -= amount
class BalancePrinter:
def print_balance(self, account):
print(f'Account no: {account.account_number}, Balance: {account.balance} ')
class AccountNumberManager:
def change_account_number(self, account, new_account_number):
account.account_number = new_account_number
print(f'Your account number has changed to "{account.account_number}" ')
class BankAccount:
def __init__(self, account_number: int, balance: float):
self.account_number = account_number
self.balance = balance
self.deposit_manager = DepositManager()
self.withdrawal_manager = WithdrawalManager()
self.balance_printer = BalancePrinter()
self.account_number_manager = AccountNumberManager()
def deposit_money(self, amount: float):
self.deposit_manager.deposit_money(self, amount)
def withdraw_money(self, amount: float):
self.withdrawal_manager.withdraw_money(self, amount)
def print_balance(self):
self.balance_printer.print_balance(self)
def change_account_number(self, new_account_number: int):
self.account_number_manager.change_account_number(self, new_account_number)
Задачи, связанные с управлением банковским счетом, мы разделили на отдельные классы, упростив в случае необходимости изменение классов одинакового назначения.
в) пример расширения кодовой базы:
🔘 Продолжение части 1
🔘 Часть 2
🔘 Часть 3
@machinelearning_interviewimport numpy as np
Polynomial = np.polynomial.Polynomial
p = Polynomial([1, -1, 1])
q = Polynomial([2, -3])
print(int((p + q)(1)))nn.Module и переопределения метода forward. Метод forward принимает на вход прогнозируемый выход и фактический выход и возвращает значение потерь.
Приведем пример кода:
import torch
import torch.nn as nn
class CustomLoss(nn.Module):
def __init__(self):
super(MyLoss, self).__init__()
def forward(self, output, target):
loss = ... # compute the loss
return loss
Теперь, чтобы использовать функцию потерь, необходимо инициализировать ее и передать в качестве аргумента параметру criterion оптимизатора в цикле обучения.
model = ...
optimizer = ...
criterion = CustomLoss()
# цикл обучения
for epoch in range(num_epochs):
optimizer.zero_grad()
outputs = model(data)
loss = criterion(outputs, labels)
loss.backward()
optimizer.step()
...
#pytorch #junior
@machinelearning_interviewНативная интеграция. Информация о продукте www.otus.ru