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
#!/usr/bin/python3 | |
# Sample GAN implementation for learning purposes only | |
# The network will model 2 different dataset of different distribution and | |
# train Generator to approximate the Distributor's distribution better | |
import numpy as np | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim |
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
let hasBlobConstructor = typeof(Blob) !== 'undefined' && (function () { | |
try { | |
return Boolean(new Blob()); | |
} catch (e) { | |
return false; | |
} | |
}()); | |
let hasArrayBufferViewSupport = hasBlobConstructor && typeof(Uint8Array) !== 'undefined' && (function () { | |
try { |
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
[ | |
{ | |
"vote_count": 417, | |
"id": 429203, | |
"video": false, | |
"vote_average": 6.4, | |
"title": "The Old Man & the Gun", | |
"popularity": 304.393, | |
"poster_path": "/a4BfxRK8dBgbQqbRxPs8kmLd8LG.jpg", | |
"original_language": "en", |
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 calculate_distribution(loader): | |
step = 0 | |
mean = torch.empty(3) | |
std = torch.empty(3) | |
for data, label in loader: | |
b, c, h, w = data.shape | |
total_pixels = b * h * w | |
sum_ = torch.sum(data, dim=[0, 2, 3]) | |
sum_of_square = torch.sum(data ** 2, dim=[0, 2, 3]) |
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
name: "Face-ResNet" | |
layer { | |
name: "data" | |
type: "ImageData" | |
top: "data" | |
top: "label" | |
include { | |
phase: TRAIN | |
} | |
transform_param { |
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
""" | |
Inception ResNet V2 | |
Official Tensorflow Implementation | |
@ https://github.com/tensorflow/models/blob/master/research/slim/nets/inception_resnet_v2.py | |
Paper | |
@ http://arxiv.org/abs/1602.07261 | |
Naming convention in the official TF-slim implementation |
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
#!/usr/bin/python3 | |
import time | |
import json | |
import urllib | |
from tornado.ioloop import IOLoop | |
from tornado.gen import coroutine | |
from tornado.httpserver import HTTPServer | |
from tornado.concurrent import run_on_executor | |
from tornado.web import Application, RequestHandler |
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
name: "HED" | |
layer { | |
name: "data" | |
type: "ImageLabelmapData" | |
top: "data" | |
top: "label" | |
include { | |
phase: TRAIN | |
} | |
transform_param { |
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
""" File name : NumpyPerformanceTest.py | |
Description : This script is to profile the performance of different numpy methods | |
Usage : python3 NumpyPerformanceTest.py | |
Author : Rex Low | |
""" | |
import cv2 |
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
name: "SE-ResNet-50" | |
# mean_value: 104, 117, 123 | |
layer { | |
name: "data" | |
type: "Input" | |
top: "data" | |
input_param: { | |
shape: { | |
dim: 1 | |
dim: 3 |
NewerOlder