\begin{equation*}
\left[ \begin{array}{cccc}
i_{1} & i_{2} & i_{3} \\\end{array} \right] \times \left[ \begin{array}{cccc}
W_{i1j1} & W_{i1j2} & W_{i1j3} \\
W_{i2j1} & W_{i2j2} & W_{i2j3} \\
W_{i3j1} & W_{i3j2} & W_{i3j3} \\ \end{array} \right] = \left[ \begin{array}{cccc}
h_{1in} & h_{2in} & h_{3in} \\\end{array} \right]
\end{equation*}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the docker image available. I am using cpu version here. If needed there is gpu version available. | |
FROM bvlc/caffe:cpu | |
# Copy the file into docker | |
COPY requirements.txt requirements.txt | |
# Run the copied file | |
RUN pip install -r requirements.txt | |
# create a folder called model1 and copy all the files in the folder into that folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
from torch.optim import lr_scheduler | |
import numpy as np | |
import time | |
import os | |
import argparse | |
## Load the model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras import applications | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras import optimizers | |
from keras.models import Sequential, Model | |
from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D | |
from keras import backend as k | |
from keras.callbacks import ModelCheckpoint, LearningRateScheduler, TensorBoard, EarlyStopping | |
img_width, img_height = 256, 256 | |
train_data_dir = "data/train" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras import applications | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras import optimizers | |
from keras.models import Sequential, Model | |
from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D | |
from keras import backend as k | |
from keras.callbacks import ModelCheckpoint, LearningRateScheduler, TensorBoard, EarlyStopping | |
img_width, img_height = 256, 256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fastscript usage under various instancees | |
# https://github.com/fastai/fastscript/blob/master/00_core.ipynb | |
# https://fastcore.fast.ai/script.html | |
from fastcore.all import * | |
@call_parse | |
def test_script(p: Param(help="any basic string", type=str)): | |
print(len(p)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_tile_name_path(dst_dir, index, city=city, code=code): | |
''' | |
generating specific tile name | |
''' | |
dst_tile_name = "{}_{}_{}.tif".format(city, code, str(index).zfill(5)) | |
dst_tile_path = os.path.join(dst_dir, dst_tile_name) | |
return dst_tile_name, dst_tile_path | |
def get_tile_transform(parent_transform, pixel_x,pixel_y): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@patch_to(ds.FeatureCollection, cls_method=True) | |
def read_generic(cls, | |
fp: str, | |
dst_crs: Union[str, rasterio.crs.CRS]=None, | |
): | |
''' | |
geojson reader and can also be used to ensure the geojson in mapped to a destined crs | |
''' | |
with open(fp, 'r', encoding='utf-8') as f: | |
collection = json.load(f) |
These are the list of papers concepts you should learn to become a PRO in GAN Research. We will see one as a step by step improvment in generation quality, stabilized training etc.
- The first paper on GAN by IAN GoodFellow and team. There are many blogs on how a GAN works based on this paper. A simple search on google should give u many results. Asking an LLM is far more better.
- GANs more susceptible to mode-collapse, vanishing gradients, so people moved away from simple BCE loss to Earth mover distance and some kind of regalurization to avoid these. Read WGAN and WGAN-GP papers to understand this again.
- Next up is ProGAN. this is the first paper to my knowledge which basically made GANs possible to generate high resolution images. though progressive training is out of fashion, I still consider one should read about this [https://arxiv.org/pdf/1710.10196v3]. Their another key contribution is