Closed wdon021 closed 3 years ago
as you can see in the stack trace, the error occurs in this function:
/content/drive/My Drive/Colab Notebooks/COMP421/Project/loss_metrics.ipynb in calc_aspect_ratio_loss(self, width, height, label_lengths)
Somewhere there we call xp.ones_like
. You have to make sure that you provide the array that is wrapped in the Variable
. You can get access to the array, by calling .data
on the Variable
. That should be it, I guess.
Hi Bartzi,
You are correct, somehow, I have to add .data
for every xp.ones_like
and xp.zeros_like
.
Thank you for helping me out, really appreciated!!.
I run into another problem when training the model, TypeError Traceback (most recent call last)
Hi Bartzi, Thank you for sharing the code. I am currently trying to get this model working in google colab, and I have encounter an error when I train_fsns.
I have a look into the loss_metric.py and print out the grid and labels `
loss_weights = [1, 1.25, 2, 1.25]
They are all variable. My guess this is where the error occurs.
I am not sure how to fix the problem, I am new to the chainer and this type of model.
Can you please help me with the problem? thank you in advance.