Skip to content
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

Incompatible shapes: [8,12,384,3] vs. [8,3,384,384] #266

Open
Yumari1985 opened this issue Nov 12, 2024 · 0 comments
Open

Incompatible shapes: [8,12,384,3] vs. [8,3,384,384] #266

Yumari1985 opened this issue Nov 12, 2024 · 0 comments

Comments

@Yumari1985
Copy link

[TLX] Loading (512,) in conv4_4
[TLX] Input _inputlayer_1: (8, 3, 96, 96)
[TLX] Input _inputlayer_2: (8, 3, 384, 384)
Epoch 0: StepDecay set learning rate to <tf.Variable 'Variable:0' shape=() dtype=float32, numpy=0.05>.
Traceback (most recent call last):
File "train.py", line 212, in
train()
File "train.py", line 147, in train
loss = trainforinit(lr_patch, hr_patch)
File "/home/liko/miniconda3/envs/tensorflow/lib/python3.7/site-packages/tensorlayerx/model/core.py", line 803, in call
loss = self.net_with_train(data, label, *args, **kwargs)
File "/home/liko/miniconda3/envs/tensorflow/lib/python3.7/site-packages/tensorlayerx/model/utils.py", line 164, in call
loss = self.net_with_loss(data, label, *args, **kwargs)
File "/home/liko/miniconda3/envs/tensorflow/lib/python3.7/site-packages/tensorlayerx/nn/core/core_tensorflow.py", line 173, in call
output = self.forward(inputs, *args, **kwargs)
File "train.py", line 64, in forward
loss = self.loss_fn(out, hr)
File "/home/liko/miniconda3/envs/tensorflow/lib/python3.7/site-packages/tensorlayerx/losses/tensorflow_cost.py", line 168, in mean_squared_error
mse = tf.reduce_mean(tf.math.squared_difference(output, target))
File "/home/liko/miniconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/ops/gen_math_ops.py", line 10233, in squared_difference
_ops.raise_from_not_ok_status(e, name)
File "/home/liko/miniconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 6862, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [8,12,384,3] vs. [8,3,384,384] [Op:SquaredDifference]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant