Comments (9)
Ahhh, my first guess is this is due to how epochs are calculated combined with how the looping over the data is done. When you use a batch size of 1, the # of epochs are perfectly calculated to run over exactly all your data once. However with a batch size > 1, then the number of epochs is the ceiling of dividing the size of your training set by the batch size. For example, with 42 test samples and a batch size of 5, the number of epochs would be ceil(42 / 5) = 9. But 9 * 5 is 45 samples, so you'd be evaluating 3 test samples twice....
It's a lazy way to calculate epochs and do the looping...
Really, the evaluation_loop should make better use of the batch queue (by setting allow_smaller_final_batch=True).
Glad you are making use of the model though! Just beware... this was quickly put together for a class homework and definitely is not polished.
from squeezenet.
Thanks! Evaluation loop aside, if I load the checkpoint train model directly and run inference directly, the logit outputs are wildly different for various batch sizes with same input. Just wondering why that would be?
Yes thanks was just playing around with squeezenet.
from squeezenet.
Hey, so it seems the issue is that batch_norm
needs to be set to is_training=False
during inference. You can do this by adjusting your squeezenet model as such:
def squeezenet_arg_scope(is_training=True): batch_norm_params = {'is_training': is_training, 'decay': 0.9, 'updates_collections': None} with slim.arg_scope([slim.conv2d], normalizer_fn=slim.batch_norm, normalizer_params=batch_norm_params) as sc: return sc
from squeezenet.
Ohhh... woops! Good call, thank you!
from squeezenet.
Finally had some time to include your fix. Thanks again.
from squeezenet.
Hi @levelvc @vonclites
I have followed similar steps
Converting my images to TFrecords and then trying to use the train_squeezenet script for the same
When i do the same I am getting the below log.txt error
Please let me know what exactly is wrong and the workaround for it
Thanks
from squeezenet.
from squeezenet.
Looks like your batch size is zero.
…
On Oct 30, 2018, at 5:16 AM, Bhagyoday-Patil @.***> wrote: Hi @levelvc @vonclites I have followed similar steps Converting my images to TFrecords and then trying to use the train_squeezenet script for the same When i do the same I am getting the below log.txt error log.txt Please let me know what exactly is wrong and the workaround for it Thanks — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Sorry @levelvc slight mistake
Please find attachment logs.
logs.txt
I have used https://github.com/kwotsin/create_tfrecords to convert my images to tfrecords.
The same tfrecords when given as input to the train_squeezenet script is throwing that error. I have only 2 classes. I am not understanding what exactly is wrong. I have not made any changes in any of the scripts.
tensorflow version = 1.11.0
ubuntu version = 16.04.3
no GPU/CUDA
from squeezenet.
@vonclites @muthiyanbhushan Can you please help me with this error.
As descried above I am getting this error.
PFA log_1.7.1.txt
from squeezenet.
Related Issues (13)
- what's the proper folder structure of tfrecords?
- It doesn't work on tensorflow 1.9
- Expected image (JPEG, PNG, or GIF),get /000/000/000 HOT 3
- Hyperparams arguments missing HOT 2
- How to use this architecture with custom dataset HOT 5
- Imagenet pre-trained model HOT 1
- No Relu Layer in squeezenet.py ? HOT 2
- what should be the directory structure of the images? HOT 4
- ImportError: No module named slim.deployment HOT 13
- Does the training script need images only of size 224x224 ? HOT 2
- Can you include a requirements.txt file? HOT 3
- How can I retrain it with new classes and labels?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from squeezenet.