-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detector training not working #58
Comments
Starting in import tensorflow as tf
import numpy as np
inputs = tf.keras.layers.Input((None, None, 3))
outputs = tf.keras.layers.Conv2D(kernel_size=2, strides=2, filters=2)(inputs)
model = tf.keras.models.Model(inputs=inputs, outputs=outputs)
model.compile(loss='mse', optimizer='Adam')
x=np.ones((1, 320, 320, 3))
y=np.ones((1, 160, 160, 2))
sample_weight = np.ones((1, ))
# This raises ValueError: weights can not be broadcast to values.
model.fit(x=x, y=y, sample_weight=sample_weight)
# This works.
model.fit(x=x, y=y) The good news is that if you install the most recent release candidate for TF 2.2, this seems to work properly. So if you install Let me know if this resolves the issue for you. Thanks! |
Issue resolved wit |
@faustomorales. i installed 2.2.0rc2 but i dont have gpu version, so i can't train on gpu. How can i fix it ? tks so much |
@nightfuryyy If you've done |
i on linux, it doesn't work. T fixed that by down version to 0.6.3. |
Really thanks... I have similar error.... I'will upgrade TF. |
The example of fine-tuning the detector in the docs isn't working with the 0.8.0 release, although other examples, like this one, are working.
Downgrading to 0.6.3 got the example working again (intermediate versions, e.g. 0.7.x, were also failing with the same error, which is detailed below).
To reproduce, create an empty python 3.7.4 conda environment with the following installs on Windows 10:
I then copy-pasted that fine-tuning example into
train.py
and got the following when running it:The source of the error can probably be uncovered here, likely within
detection.py
. I'd try to uncover myself, but your familiarity with the source might be more expeditious.The text was updated successfully, but these errors were encountered: