GithubHelp home page GithubHelp logo

tony607 / keras_catvsdog_tf_estimator Goto Github PK

View Code? Open in Web Editor NEW
32.0 4.0 9.0 281 KB

Source for post "An Easy Guide to build new TensorFlow Datasets and Estimator with Keras Model"

License: Other

Jupyter Notebook 87.66% Python 12.34%
keras keras-tensorflow deep-learning estimator

keras_catvsdog_tf_estimator's Introduction

An Easy Guide to build new TensorFlow Datasets and Estimator with Keras Model

The repo contains the jupyter notebook for 2 related the blog posts

An Easy Guide to build new TensorFlow Datasets and Estimator with Keras Model keras_estimator_vgg16-cat_vs_dog.ipynb

How to leverage TensorFlow's TFRecord to train Keras model keras_estimator_vgg16-cat_vs_dog-TFRecord.ipynb

Dependencies

Python 3.5, numpy, tensorflow, pillow

How to Run

Run the python notebook by cd into the directory in command line then run

jupyter notebook

Select any of the two *.ipynb files in the browser

Happy coding! Leave a comment in my post if you have any question.

keras_catvsdog_tf_estimator's People

Contributors

tony607 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

keras_catvsdog_tf_estimator's Issues

path issue

Hi, I like your tutorial! I just have one minor suggestion, since you are using a path that only exists on your computer, running the notebook directly gives me the error below. And the formatting of the path is not very Mac-freindly...


FileNotFoundError Traceback (most recent call last)
in ()
17 src = os.path.join(original_dataset_dir, fname)
18 dst = os.path.join(train_cats_dir, fname)
---> 19 shutil.copyfile(src, dst)
20 # Copy first 1000 dog images to train_dogs_dir
21 fnames = ['dog.{}.jpg'.format(i) for i in range(1000)]
/Users/Qihong/anaconda/envs/brainiak/lib/python3.6/shutil.py in copyfile(src, dst, follow_symlinks)
118 os.symlink(os.readlink(src), dst)
119 else:
--> 120 with open(src, 'rb') as fsrc:
121 with open(dst, 'wb') as fdst:
122 copyfileobj(fsrc, fdst)
FileNotFoundError: [Errno 2] No such file or directory: 'E:\Learning_Resources\Deep_learning\my_data_sets\DATASETS_IMAGE\dog_vs_cat\train/cat.0.jpg'

They are simple to solve, but it would be really nice if you can fix it!

define feature_columns to use remade estimator

Hi I've been able to adapt your model to my own data set of images. It was very informative so I thank you for putting it together. If I wanted to use one of the premade TF estimators like DNNClassifier how would I define the feature_column required for the estimator?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.