TF-Slim is a lightweight library for defining, training and evaluating complex models in TensorFlow.
Questions tagged [tf-slim]
117 questions
1
vote
1 answer
TensorFlow: What is the purpose of endpoints for data parallelism when training across multiple machines?
In the TensorFlow-slim source code, there was an endpoint indicated in the creation of its loss function:
def clone_fn(batch_queue):
"""Allows data parallelism by creating multiple clones of network_fn."""
images, labels = batch_queue.dequeue()
…

kwotsin
- 2,882
- 9
- 35
- 62
1
vote
1 answer
Print Text Representation of Tensorflow (tf-slim) Model
Is there any way to print a textual representation of a tf-slim model along the lines of what nolearn offers:
## Layer information
name size total cap.Y cap.X cov.Y cov.X filter Y filter X field Y field…

Alex Rothberg
- 10,243
- 13
- 60
- 120
1
vote
1 answer
About tf.contrib.slim data prepare documentation
I have spend much time to understand how to prepare my data to feed into Slim Net.
But I still can't quiet understand how to prepare my training data.
Is there a more detailed method for processing the training data, like Caffe ImageNet…

林建民
- 11
- 3
0
votes
0 answers
Adding weight regularizer with Slim directly into a layer
(Disclaimer: I'm using an old version of tensorflow (1.5.0), Python 3.6)
I'm trying to add an L1 regularizer to my (autoencoder) model, and I wish to do it directly into the layers. Following what I can find online and trying to apply it to my…

FoxYou
- 120
- 1
- 11
0
votes
1 answer
Trying to custom train MobilenetV2 with 40x40px images - wrong results after training
I need to classify small images in 4 different categories, +1 "background" for false detection.
While training the loss quickly drop to 0.7, but stay there even after 800k steps. In the end, the frozen graph seems to classify most images with the…

Robin D.
- 48
- 5
0
votes
0 answers
There's a problem with sigmoid use in multi-label image classification
Multi-labeled image classification using 'inception resnet v2' model.
I'm changing the required part to a sigmoid.
Beyond a certain number of studies, it shows results such as softmax.
The code is part of the 'inception resnet v2' in use.
def…

AZDDKKS
- 41
- 1
- 8
0
votes
1 answer
Unexpected behavior in model validation with tf.slim and inception_v1
I am trying to use the inception_v1 module written in tf.slim provided here to train the model on CIFAR 10 dataset.
The code to train and evaluate the model on the dataset is below.
# test_data = (data['images_test'], data['labels_test'])
…

Dimimal13
- 67
- 1
- 8
0
votes
1 answer
Implementing mixed precision training in tf-slim
I am trying to use mixed-precision training with tf-slim in order to speed up the training of networks and make use of the tensorcores available on my GPUs.
I also want to make use of multiple network architectures with pre-trained checkpoints.
An…

AnLu
- 1
0
votes
0 answers
How to retrain the last fully connected layer for a ssd mobilenet v2 model
I currently retrained an ssd mobile net v2 model using the tutorial. I ran the following in command line to execute the retraining. It retrained the entire model.
(tensorflow) c:\models-master\research>python object_detection/legacy/train.py…

Sade
- 450
- 7
- 27
0
votes
1 answer
Unable to achieve same performance training with vanilla Tensorflow code compared to training using TF-slim
The following code that uses the TF-Slim library to load a model and finetune it achieves a performance of 90% in a classification task (I omitted loading the data and preprocessing):
with…
0
votes
1 answer
why do I have to reshape `inputs` from `tf.train.batch()` to use with `slim.fully_connected()?
Why do I get this error for slim.fully_connected()?
ValueError: Input 0 of layer fc1 is incompatible with the layer: : expected min_ndim=2, found ndim=1. Full shape received: [32]
my input is Tensor("batch:0", shape=(32,), dtype=float32) from…

michael
- 4,377
- 8
- 47
- 73
0
votes
2 answers
Confusion matrix order in tensorflow
I have 6 classes and I used tf-slim in Tensorflow to obtained the confusion matrix such as
[[41 2 0 0 0 0]
[ 1 11 4 1 0 0]
[ 0 1 12 0 0 0]
[ 0 0 0 22 1 0]
[ 0 0 0 0 7 0]
[ 0 0 0 0 0 20]]
My question is that what is…

Jame
- 3,746
- 6
- 52
- 101
0
votes
0 answers
Parsing serialized string examples using TF-SLIM
I am trying to parse data using the TF-SLIM dataset classes.
I am combining two images into a 640x480x6 numpy array (because I combine the RGB channels of both the images) and serializing them to save them to a .tfrecords file. Here's the code to do…

Mj1992
- 3,404
- 13
- 63
- 102
0
votes
1 answer
How to print predictions in TF-Slim's eval_image_classifier.py?
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import tensorflow as tf
from datasets import dataset_factory
from nets import nets_factory
from preprocessing import…

Wei Liu
- 1
- 3
0
votes
1 answer
Fine-tuning a pre-trained VGG16 model on my own data using TF-Slim
I am trying to fine-tune the VGG-16 pretrained model using TF-Slim however, i am having trouble at the beginning (when attempting to preprocess the data i.e converting images from tiff to jpeg and then to tfrecord format).
Could anyone advise on…

Doc
- 3
- 4