Git Product home page Git Product logo

tensorflow-project-template's People

Contributors

ahmkel avatar mg2033 avatar mrgemy95 avatar o-tawab avatar radagaisus avatar waleedmohamedme avatar zidanmusk 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  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  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  avatar  avatar  avatar  avatar

Watchers

 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  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  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  avatar  avatar  avatar  avatar

tensorflow-project-template's Issues

What is the point "cur_epoch_tensor" and "global_step_tensor"?

Why keeping track of epoch and step counts is implemented with tensorflow Variables, instead of plain python variables?

It seems that it is not very efficient to store them like that, considering that they will probably be placed on GPU with other tf variables.

Is there any use case I'm missing?

I think might some problem here

self.train_step = tf.train.AdamOptimizer(self.config.learning_rate).minimize(self.cross_entropy,

I think it maybe not good idea writing optimizer there. Programer need to shrink the model size when release a well trained model. Sometimes we may want to save variables except optimizer like this:

net = ExampleModel.build_model(...)#only net defines inside
saver = tf.train.Saver()
with tf.Session() as sess:
    saver.restore(sess, model_path)
    ...
    do something to resave model for shrink size
    ...

It will be trouble in such situation when you put the model defines and optmizer together

Estimator usage

what is the appropriate way to use estimator in the template?

Error in code

Where are you giving as input which json file to read? When I am running my code or the example code you have provided, code always outputs 'missing or invalid parameters'.

logger for weights

I'm trying to use the logger to get a histogram of weights on my tensorboard.
Any chance you'd be interested in putting that in? I'll see if I can pull if off and do a pr, but if not... :)

About load model

Hi!

I have tried this template and find it's not possible to reload the parameters that I have trained While performing testing. For example: the accuracies are 50% , 75 % on validating data while training. But If we stop the training and validate the accuracy on validate data again the accuracy is only 20% which is the validate accuracy for first epoch.

Have you tried to perform continue training or testing on different saved models like epoch1, epoch 10... in this template?

validation cycles

Thank you for providing this beautiful template.

I was wondering where I'd ideally put validation cycles, say every 1000 iterations, in this structure. Any recommendations?

An Example using this template

Just a request if you can add a little mnist example using this template, it will be lot easier for beginners like me to use this template.

how to make import works

Hi, I have tried running example.py
but the error is

Traceback (most recent call last):
  File "example.py", line 3, in <module>
    from data_loader.data_generator import DataGenerator
ModuleNotFoundError: No module named 'data_loader'

How do you guys make the sibling package imports work? Are you using IDE to help you do that?

from bunch import Bunch

Hi Mr Gemy95,
Thanks for your tensorflow-template. While, in the sample "utils/config.py" , that indicated as "from bunch import Bunch", the question is where is bunch and what's the function of bunch? Is there another folder named "bunch"?
Waiting for you reply. My email address is [email protected], you may send to me directly.

About BaseModel.load

To load the model properly, I think we need:
def load(self, sess):
latest_checkpoint = tf.train.latest_checkpoint(self.config.checkpoint_dir)
...

Instead of the original
latest_checkpoint = tf.train.latest_checkpoint(os.path.join(self.config.checkpoint_dir, self.config.exp_name))

how to use it?

I execute example_trainer, nothing shows.
I execute mains/example.py, it shows : missing or invalid arguments

Does it support tensorflow serving for other apps to use it?

why Trainers?

My question is not about the implementation details. It is more of a strategic question.
I want to know the advantage of using a trainer class instead of incorporating the training in the model class as a method.
Thank you for this very clean template!

About the `init_saver` of base_model?

Why don't direct use the implement in the annotation?

    def init_saver(self):
        # just copy the following line in your child class
        # self.saver = tf.train.Saver(max_to_keep=self.config.max_to_keep)
        raise NotImplementedError

Estimator

Hi,

I was looking for a nice and clean structure for TF projects and your's comes as number 1.
What I miss is the testing/evaluation/inference part.
Why haven't you implemented it? Are you planning to put something up?

Regards

Loaded variables reinitialization

Hello!
I have a little concern about the model.load() position in main().
Suppose we are in main().
First, you load the model (model.load()) and then initialize variables in base train (via "self.sess.run(self.init)" in "trainer = ExampleTrainer(...)").
But in this case all the variables from the loaded model will be reinitialized with default values.
If I'm not mistaken about my concern, the solution is simple - move model.load() right after the trainer = ExampleTrainer(...) in main().
It helped me while implementing your magnificent template for my project.
Thanks.

custom word

How to train custom word below like

wrong word----------------- correct word
G#%oogl$!@e ---------- Google
$%Californ%&(ia -------- California

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.