logo

Flux-PyTorch-TensorFlow Cheat Sheet 📂Machine Learning

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]