Comments (7)
I'm having trouble reproducing this issue. Yes, pop()
is a method of lists, not arrays, but batch_y
is a list. In order to reproduce this I've changed the generator to always pop the last batch item and it works without issues. Are you using one of the Jupyter notebooks to train? Did you make any changes to the code, either in the notebook or elsewhere?
from ssd_keras.
Hi, strange ...
Here's what I changed in the code:
in [3]: weights_path = '/home/ubuntu/ssd_keras/pretrained_weights/vgg-16_ssd-fcn_ILSVRC-CLS-LOC.h5'
in [5]: # changed the beginning of the paths to /home/ubuntu/ssd_keras/...
That's it...
in ssd_batch_generator.py, Ln 676, the scripts is turning batch_y into an array.
Could I maybe comment-out this whole for-loop which is causing the error and deactivate random cropping?
Thanks!
from ssd_keras.
Just noticed that random cropping is "False" by default. Why is this happening after all?
from ssd_keras.
not sure if thats important, but Im also getting this warnings:
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py:509: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
return np.fromstring(tensor.tensor_content, dtype=dtype).reshape(shape)
from ssd_keras.
Well, for starters, this implementation requires Python 3 as stated in the dependencies. I see that you are using Python 2. It makes little sense to try to spot the problem as long as something as basic as the Python version is incorrect. I would also recommend to install things like TensorFlow, Keras, and other libraries within virtual environments (e.g. Anaconda environments) rather than directly so that you can maintain multiple different environment configurations.
As for your comments above:
in ssd_batch_generator.py, Ln 676, the scripts is turning batch_y into an array.
No, it only turns the i-th element of batch_y
into an array:
batch_y[i] = np.array(batch_y[i])
batch_y
is still a list.
Just noticed that random cropping is "False" by default. Why is this happening after all?
Because max_crop_and_resize
and full_crop_and_resize
ultimately use random_crop
to perform the actual cropping.
I wouldn't know why this issue would be related to the Python version (after all, a list is a list regardless of the Python version), but since I cannot reproduce the issue in Python 3, I can only suggest that you use a Python 3 environment.
from ssd_keras.
ah damnit. didn't see that.
I commented it out and training is running now. will see if the results are still fine, but afterwards I will follow your advice with the virtualenv. Since no one else seems to have this error, this might be the issue. Thanks anyway, will close this now.
from ssd_keras.
Yeah, commenting it out is actually a good makeshift solution. The only effect will be that some batch items might have no ground truth boxes in them after the random cropping, but this should happen very rarely and even so it likely won't impact the training at all.
from ssd_keras.
Related Issues (20)
- InvalidArgumentError when compiling model with ssd_loss HOT 1
- WARNING:tensorflow:Gradients do not exist for variables ['conv4_3/bias:0',...] when minimizing the loss. HOT 1
- "Invalid argument: Index out of range using input dim 0; input has only 0 dims" during ssd300 model training
- load weight
- ValueError: Error when checking input: expected input_3 to have 4 dimensions, but got array with shape
- While training I got training terminate error . Epoch 00001: LearningRateScheduler setting learning rate to 0.001. 1/10 [==>...........................] - ETA: 4:08 - loss: nanBatch 0: Invalid loss, terminating training Epoch 00001: saving model to ssd512_URPC2018_epoch-01.h5 Process finished with exit code 0
- ValueError: An operation has `None` for gradient. Please make sure that all of your ops have a gradient defined (i.e. are differentiable). Common ops without gradient: K.argmax, K.round, K.eval.
- ValueError: Layer model expects 1 input(s), but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, None, None, None) dtype=uint8>, <tf.Tensor 'IteratorGetNext:1' shape=(None, None, None) dtype=float32>] HOT 23
- Parameters of the model HOT 1
- Bouding boxes predictions are concentrated in left top corner HOT 1
- Ambiguous dimension while trying to load weights.
- Urgent!! Invalid Loss HOT 4
- What are the requirements to run this code?. HOT 1
- Pascal VOC Training Person Detection
- The device being used is CPU while capturing image from webcam. How do I use my GPU for processing instead?
- Label error during Coco Training HOT 1
- TypeError: Expected any non-tensor type, got a tensor instead.
- Changes make the code work in 2023 HOT 2
- custom SSD300 model
- error while training with custom dataset in COCO format
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 ssd_keras.