This file contains hidden or 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
| # Typical setup to include TensorFlow. | |
| import tensorflow as tf | |
| # Make a queue of file names including all the JPEG images files in the relative | |
| # image directory. | |
| filename_queue = tf.train.string_input_producer( | |
| tf.train.match_filenames_once("./images/*.jpg")) | |
| # Read an entire image file which is required since they're JPEGs, if the images | |
| # are too large they could be split in advance to smaller files or use the Fixed |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 tensorflow as tf | |
| import numpy as np | |
| import tensorflow.contrib.slim as slim | |
| total_layers = 25 #Specify how deep we want our network | |
| units_between_stride = total_layers / 5 | |
| def resUnit(input_layer,i): | |
| with tf.variable_scope("res_unit"+str(i)): | |
| part1 = slim.batch_norm(input_layer,activation_fn=None) |
This file contains hidden or 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 requests | |
| import json | |
| # Mimic the two famous Snapchat filters: The flower crown & the dog facial parts filter. | |
| # The target image must contain at least one human face. The more faces you got, the more funny it should be! | |
| # | |
| # Only three commands are actually needed in order to mimic the Snapchat filters: | |
| # face landmarks: https://pixlab.io/cmd?id=facelandmarks | |
| # smart resize: https://pixlab.io/cmd?id=smartresize | |
| # merge: https://pixlab.io/cmd?id=merge |
This file contains hidden or 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
| ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
| ## Created by: Hang Zhang, Rutgers University, Email: [email protected] | |
| ## Modified by Thomas Wolf, HuggingFace Inc., Email: [email protected] | |
| ## Copyright (c) 2017-2018 | |
| ## | |
| ## This source code is licensed under the MIT-style license found in the | |
| ## LICENSE file in the root directory of this source tree | |
| ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
| """Encoding Data Parallel""" |
OlderNewer