Skip to content

Instantly share code, notes, and snippets.

View yonetaniryo's full-sized avatar

Ryo Yonetani yonetaniryo

View GitHub Profile
@yonetaniryo
yonetaniryo / pytorch_example.ipynb
Last active January 17, 2022 12:24
pytorch_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yonetaniryo
yonetaniryo / jax_gan.ipynb
Last active October 13, 2021 00:39
jax_GAN.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yonetaniryo
yonetaniryo / trajectory_forecasting_handson.ipynb
Last active October 6, 2021 01:30
trajectory_forecasting_handson.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yonetaniryo
yonetaniryo / jax_cnn_on_cifar10.ipynb
Created October 2, 2021 11:44
jax_CNN_on_CIFAR10.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yonetaniryo
yonetaniryo / jax_mlp_on_mnist.ipynb
Last active October 5, 2021 06:24
jax_MLP_on_MNIST.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from torchvision import datasets, transforms
import torchvision.models as models
from torch.utils.data import DataLoader, Subset
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
@yonetaniryo
yonetaniryo / fl_pytorch.ipynb
Created April 7, 2021 01:15
fl_pytorch.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import cv2
import numpy as np
from glob import glob
import sys
def main(dirname, ext='.jpg', step=5, vis=False):
# Estimating global motion by 1) estimating dense optical flows, 2) estimating homography matrix,
# and 3) calculating global motion flows based on the homography.
# gm_flow will store four global motion at four corners ([25 | 75]-percentile points of [width | height]).