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 | |
| FC_SIZE = 1024 | |
| DTYPE = tf.float32 | |
| def _weight_variable(name, shape): | |
| return tf.get_variable(name, shape, DTYPE, tf.truncated_normal_initializer(stddev=0.1)) | 
      
      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
    
  
  
    
  | '''This script goes along the blog post | |
| "Building powerful image classification models using very little data" | |
| from blog.keras.io. | |
| It uses data that can be downloaded at: | |
| https://www.kaggle.com/c/dogs-vs-cats/data | |
| In our setup, we: | |
| - created a data/ folder | |
| - created train/ and validation/ subfolders inside data/ | |
| - created cats/ and dogs/ subfolders inside train/ and validation/ | |
| - put the cat pictures index 0-999 in data/train/cats | 
  
    
      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
    
  
  
    
  | # | |
| # mnist_cnn_bn.py date. 5/21/2016 | |
| # date. 6/2/2017 check TF 1.1 compatibility | |
| # | |
| from __future__ import absolute_import | |
| from __future__ import division | |
| from __future__ import print_function | |
| import os | 
  
    
      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
    
  
  
    
  | # pylint: disable=C0111,too-many-arguments,too-many-instance-attributes,too-many-locals,redefined-outer-name,fixme | |
| # pylint: disable=superfluous-parens, no-member, invalid-name | |
| import sys, datetime, math, random | |
| sys.path.insert(0, "../../python") | |
| import mxnet as mx | |
| import numpy as np | |
| from io import BytesIO | |
| class Batch(object): | |
| def __init__(self, data_names, data, label_names, label): | 
  
    
      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
    
  
  
    
  | from keras.models import Sequential | |
| from keras.layers.core import Dense, Dropout, Activation | |
| from keras.optimizers import SGD | |
| import numpy as np | |
| X = np.array([[0,0],[0,1],[1,0],[1,1]]) | |
| y = np.array([[0],[1],[1],[0]]) | |
| model = Sequential() | |
| model.add(Dense(8, input_dim=2)) |