mrgemy95 / tensorflow-project-template Goto Github PK
View Code? Open in Web Editor NEWA best practice for tensorflow project template architecture.
License: Apache License 2.0
A best practice for tensorflow project template architecture.
License: Apache License 2.0
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?
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
I try to see the graph in tensorboard but get a blank page. However other pages such as "Scalars" are normal.
Hi! A wonderful and useful project!
Maybe you can make this repo a template repo to get it more convenient to use, and you can refer this https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository to make it.
Thanks for your great effort again!
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?
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?
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?
what is the appropriate way to use estimator in the template?
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
How to train custom word below like
wrong word----------------- correct word
G#%oogl$!@e ---------- Google
$%Californ%&(ia -------- California
As title, is there any tensorflow-project-template that is based on tf version 2.x.x?
Thanks!
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))
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.
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.
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'.
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
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... :)
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.
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!
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.