juglab/n2v

history = model.train() won't work due to dtype float 32

citypalmtree opened this issue · 2 comments

Hello.

I am using n2v in python following the examples in this Github.
And I have been able to train and predict using n2v.

However, for some reason, I cannot train this specific data set anymore.
It gives me an error in:

ValueError Traceback (most recent call last)

in ()
1 # We are ready to start training now.
----> 2 history = model.train(X, X_val)

18 frames

/tensorflow-1.15.2/python3.6/tensorflow_core/python/framework/ops.py in internal_convert_to_tensor(value, dtype, name, as_ref, preferred_dtype, ctx, accepted_result_types)
1271 raise ValueError(
1272 "Tensor conversion requested dtype %s for Tensor with dtype %s: %r" %
-> 1273 (dtype.name, value.dtype.name, value))
1274 return value
1275

ValueError: Tensor conversion requested dtype float32_ref for Tensor with dtype float32: <tf.Tensor 'training/Adam/Adam/channel_0down_level_0_no_0/kernel/m/Initializer/zeros:0' shape=(3, 3, 1, 32) dtype=float32>

X and X_val have both dtype=float32
I compared images in this data set with other images that work in n2v, and noticed not a single difference.
Both images are 32 bit images and have similar pixel ranges.

Has anyone had this issue?
Any advice would be greatly appreciated!

Hi @citypalmtree

This is a first!

Would you be able to provide us with a minimal ‘working’ example showcasing the bug? That would help us tracking down the problem.

I will tag @turekg, maybe she has time to look into this 😇 🙏 .

Hi @tibuch ,

I realized that this issue is because I wasn't connected to GPU...
I was using Google Colab, and I didn't notice that my GPU access has been terminated after 12 hours of use.
Sorry about this!

I am having another issue this time, and I think it's related to Tensorboard. I will open another issue.

Thank you for your response!