TensorFlow-cn | 简单粗暴 TensorFlow A Concise Handbook | Machine Learning library
kandi X-RAY | TensorFlow-cn Summary
kandi X-RAY | TensorFlow-cn Summary
简单粗暴 TensorFlow (1.X) | A Concise Handbook of TensorFlow (1.X) | 此版本不再更新,新版见
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Train the model
- Get a batch of sequences
- Test accuracy
- Predicts the logits of the given inputs
- Predict from input
- Compute the gradient loss between two points
- Evaluate function f
- Predicts the logits for inputs
TensorFlow-cn Key Features
TensorFlow-cn Examples and Code Snippets
Community Discussions
Trending Discussions on TensorFlow-cn
QUESTION
I am using tensorflow's object detection api with faster_rcnn_resnet101 and get the following error when trying to train:
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: Input to reshape is a tensor with 36 values, but the requested shape requires a multiple of 16
[[{{node Reshape_13}}]]
[[IteratorGetNext]]
[[IteratorGetNext/_7243]]
(1) Invalid argument: Input to reshape is a tensor with 36 values, but the requested shape requires a multiple of 16
[[{{node Reshape_13}}]]
[[IteratorGetNext]]
0 successful operations. 0 derived errors ignored.
I am using a slightly modified version of the pets-train.sh file to run the training (only paths have been altered). I am trying to train on tf.record files containing jpg images of size (1280, 720) and have made no changes to the network architecture (I have confirmed that all images in the record are of this size).
Curiously, I can successfully run inference on these images when I do something equivalent to what's in the tutorial file detect_pets.py. This makes me think something is wrong with the way that I've created the tf.record files (code below) rather than anything to do with the shape of the images, despite the error having to do with reshape. However,I've successfully trained on tf.records created in the same way before (from images of size (600, 600), (1024, 1024), and (720, 480), all with the same network). Moreover, I've previously encountered a similar error (only the numbers were different but the error was still with node Reshape_13) on a different data set of images with size (600, 600).
I am using python 3.7, tf version 1.14.0, cuda 10.2, Ubuntu 18.04
I've looked extensively at various other posts (here, here, here, here, and here) but I wasn't able to make any progress.
I've tried adjusting the keep_aspect_ratio_resizer parameters (originally min_dimension=600, max_dimension=1024 but I've also tried min, max = (720, 1280) and have tried pad_to_max_dimension: true with both of these min/max choices as well).
This is the code I'm using to create the tf.record file (apologies or indentations being off here):
...ANSWER
Answered 2019-Sep-17 at 22:41I'm an idiot: confirmed.
The problem was that classes_text, classes, and difficult were the wrong length.
Replaced
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TensorFlow-cn
You can use TensorFlow-cn like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page