Closed mmroden closed 3 years ago
Happy to discuss all the various iterations I went through; Python 3.7 because 3.8 requires tensorflow>2, going to cbdeep==0.6.1 instead of 0.5.2 because of another error, etc etc. All ends in that matplotlib error, and I've tried various versions of that as well, going back to 2.2.5.
OK, this looks like a problem with matplotlib, not n2v. I can get things to go by splitting up into three code blocks:
import numpy as np
from csbdeep.utils import plot_history
from n2v.utils.n2v_utils import manipulate_val_data
then
from matplotlib import pyplot as plt
import urllib
import os
import zipfile
then
import n2v
from n2v.internals.N2V_DataGenerator import N2V_DataGenerator
datagen = N2V_DataGenerator()
The matplotlib error will happen on the second chunk, if it happens, and then rerunning the cell repeatedly until the problem goes away.
I don't see this happening on 3.8 or 3.9, but since this is a heisenbug, I'm not sure if that was just luck.
BTW eventually got things working when I downgraded to tensorflow 1.14, 1.15 caused other errors with csbdeep that might be fixed in version 0.61 (which, in turn, would require downgrading n2v...)
Interesting, I just installed n2v with tf 1.15 last week and had no such problem.
Anyway, thank you for reporting and 'resolving' the issue. I think it is time to finally make the jump to tf 2. I will look into this.
Thanks-- just ping me if you want an outside tester. I'm on a mac, too, not sure if that makes a difference here (probably, since I can't use tensorflow-gpu).
I started a tf2 conversion myself when I saw that the Adam optimizer is not the tf version, but the keras version, which yields a whole slew of other issues. I figured my time would be better spent trying to get what exists running before I tried to change anything.
Good luck!
Hi,
I've been trying to get the sample notebooks to run.
I set my environments up with this script:
My
requirements.txt
file:For grins, I've also used a smaller requirements file:
When I run this code from the top of the 2D examples:
I get this error:
My environment contains these libraries and versions (from my most recent attempt, when I've limited
matplotlib<3
):