Flux-PyTorch-TensorFlow Cheat Sheet
Overview
This document organizes code that performs the same functions in Flux, PyTorch, and TensorFlow.
Let’s assume the following environment for Flux.
using Flux
Let’s assume the following environment for PyTorch.
import torch
import torch.nn as nn
import torch.nn.functional as F
Let’s assume the following environment for TensorFlow.
import tensorflow as tf
from tensorflow import keras
1-Dimensional Tensor
줄리아Julia | 파이토치PyTorch | 텐서플로우TensorFlow | |
Column Vector | |||
[1 4 -1 2] | [1;4;-1;2] |