Comments (8)
Would you be able to provide more details about what you have modified and possibly the full log of running the model?
from models.
How can I create a inception model on a custom dataset (not flowers. I am piggy backing off the flowers train scripts)?
Below is the complete error
`$ bazel-bin/inception/flowers_train --train_dir="${TRAIN_DIR}" --data_dir="${FLOWERS_DATA_DIR}" --fine_tune=True --initial_learning_r
ate=0.001 --input_queue_memory_factor=1
W tensorflow/core/framework/op_kernel.cc:896] Invalid argument: indices[0] = [0,44] is out of bounds: need 0 <= index < [32,6]
Traceback (most recent call last):
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/flowers_train.py", line 41, in
tf.app.run()
File "/Library/Python/2.7/site-packages/tensorflow/python/platform/default/_app.py", line 30, in run
sys.exit(main(sys.argv))
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/flowers_train.py", line 37, in main
inception_train.train(dataset)
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/inception_train.py", line 332, in train
_, loss_value = sess.run([train_op, loss])
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 313, in run
return self._run(None, fetches, feed_dict)
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 509, in _run
feed_dict_string)
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 562, in _do_run
target_list)
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 584, in _do_call
e.code)
tensorflow.python.framework.errors.InvalidArgumentError: indices[0] = [0,44] is out of bounds: need 0 <= index < [32,6]
[[Node: tower_0/SparseToDense = SparseToDense[T=DT_FLOAT, Tindices=DT_INT32, validate_indices=true, _device="/job:localhost/replica:0/task:0/cpu:0"](tower_0/concat, tower_0/SparseToDense/output_shape, tower_0/SparseToDense/sparse_values, tower_0/SparseToDense/default_value)]]
Caused by op u'tower_0/SparseToDense', defined at:
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/flowers_train.py", line 41, in
tf.app.run()
File "/Library/Python/2.7/site-packages/tensorflow/python/platform/default/_app.py", line 30, in run
sys.exit(main(sys.argv))
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/flowers_train.py", line 37, in main
inception_train.train(dataset)
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/inception_train.py", line 235, in train
loss = _tower_loss(images, labels, num_classes, scope)
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/inception_train.py", line 115, in _tower_loss
inception.loss(logits, labels, batch_size=split_batch_size)
File "/Users/k7/workspace/tensor_models/inception/bazel-bin/inception/flowers_train.runfiles/inception/inception_model.py", line 125, in loss
1.0, 0.0)
File "/Library/Python/2.7/site-packages/tensorflow/python/ops/sparse_ops.py", line 362, in sparse_to_dense
name=name)
File "/Library/Python/2.7/site-packages/tensorflow/python/ops/gen_sparse_ops.py", line 362, in _sparse_to_dense
validate_indices=validate_indices, name=name)
File "/Library/Python/2.7/site-packages/tensorflow/python/ops/op_def_library.py", line 655, in apply_op
op_def=op_def)
File "/Library/Python/2.7/site-packages/tensorflow/python/framework/ops.py", line 2102, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/Library/Python/2.7/site-packages/tensorflow/python/framework/ops.py", line 1129, in init
self._traceback = _extract_stack()`
from models.
Piggy-backing on the flowers data set is precisely our intention for releasing the example of the flowers data set, so I am glad it provides a good start.
Did you already generate the data and place it in $FLOWERS_DATA_DIR?
Also, if you did generate the new data set already, did you update num_classes() and num_examples_per_epoch() in flowers_data.py to correspond with your data?
https://github.com/tensorflow/models/blob/master/inception/inception/flowers_data.py#L34
from models.
Ah, didn't realize that I had explicitly set those (as that info could have been determined at runtime).
I have got the training script to run now. Thanks a lot for your help!
from models.
Hi, could this please become part of the writeup here: https://github.com/tensorflow/models/blob/master/inception/README.md
It has tripped me up and I'm sure others will also not realize that this needs to be done.
Thanks.
from models.
I am trying to build a model using flowers_train.py and got the same error. Here I changed the "examples" and "classes" for both flowers_data.py and build_image_data.py corresponding to my custom data. Still I am stuck with this error. Can anyone help me with this issue?
from models.
i have encounter this problem ,too. that indicates that your indicies do be out of bound . print it ,and check carefully. best wishes.
from models.
I meet the similar problem. I found my labels begin from 1 but not 0, so I changed the sequence of labels. Hope my answer can help you !
from models.
Related Issues (20)
- DCN V2 pretrained model on Criteo 1TB data
- 'pip3 install tf-models-nightly Collecting tf-models-nightly' HOT 4
- tf1 upgrade to tf2,tf.distribute.MirroredStrategy core dump HOT 3
- i cant run movinet streaming official model on vs code running windows, it keep throwing an error HOT 12
- Keras 3 compatibility? AttributeError: 'LossScaleOptimizer' object has no attribute 'get_scaled_loss' HOT 7
- tensorflow.python.framework.errors_impl.NotFoundError: inference.so not found. HOT 4
- TypeError: unhashable type: 'list'. When running "model_builder_tf2_test.py" HOT 8
- ValueError: Only fixed_shape_resizeris supported with tflite. Found keep_aspect_ratio_resize HOT 2
- object_detection : python setup.py egg_info did not run successfully installing the object detection API HOT 2
- Apache Beam Pipeline cannot maximize the number of workers for criteo_preprocess.py in Google Cloud
- SSD output structure
- ImportError: cannot import name 'eval_pb2' from 'object_detection.protos' HOT 6
- Unable to install tf-models-official HOT 5
- GradCAM for MoViNet HOT 2
- models/research/object_detection/exporter_main_v2.py give me error "ImportError: cannot import name 'builder'" HOT 1
- Trying to Load Keras Model Returns ListIndex Error HOT 4
- several errors (4) on movinet streaming_model_training_and_inference notebook when simply ran through on kaggle and colab HOT 7
- Issue with link to MaskConver implementation HOT 1
- How to add additional class (QR Codes) for coco dataset or any suggested dataset for the class I have mentioned HOT 4
- Keras 3 compatibility! HOT 1
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 models.