\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*}
View satellite_tiles.py
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): | |
''' |
View satellite.py
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) |
View fastscript.py
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)) |
View inception_v3_pytorch.py
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 |
View Dockerfile
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 |
View matrix.md
View Tranfer_Learning_Keras_02.py
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 |
View Transfer_Learning_Keras_01.py
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" |