Skip to content

Instantly share code, notes, and snippets.

View SubhadityaMukherjee's full-sized avatar

Subhaditya Mukherjee SubhadityaMukherjee

View GitHub Profile

Download

  • We first download the image
  • Resize it for faster computation
url = 'https://nicolekessler.files.wordpress.com/2013/04/hellish_demons.jpg?w=1024'
def download(url, max_dim=None):
    name = "demons.jpg"
 image_path = tf.keras.utils.get_file(name, origin=url)
@SubhadityaMukherjee
SubhadityaMukherjee / dowres.md
Created January 21, 2020 16:20
downloadres
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import tensorflow as tf
import IPython.display as display
import matplotlib as mpl
import numpy as np
import PIL.Image
from tensorflow.keras.preprocessing import image
@SubhadityaMukherjee
SubhadityaMukherjee / downloadshow.md
Last active January 21, 2020 16:12
Deep dream implementation
@SubhadityaMukherjee
SubhadityaMukherjee / content.py
Last active November 10, 2020 17:40
Neural Style Transfer
def get_content_loss(base_content, target):
return tf.reduce_mean(tf.square(base_content - target))