ИЛЛЮСТРАЦИЯ СЕТЕЙ - по ссылкам в комментарии.
- 2 нейрона входа
- 3 нейрона выхода, SoftMax
- Cross Entropy loss
W =
from __future__ import print_function | |
import argparse | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
from torchvision import datasets, transforms | |
from torch.optim.lr_scheduler import StepLR | |
#include <tuple> | |
template<typename Functor> struct functor_arg : functor_arg<decltype(&Functor::operator())> {}; | |
template<typename Functor, typename ReturnType, typename... ArgTypes> struct functor_arg<ReturnType (Functor::*)(ArgTypes...) const> { | |
template<std::size_t N> using arg_t = std::tuple_element_t<N, std::tuple<ArgTypes...>>; | |
}; | |
int main() { | |
auto func = [](int) {}; |