From 99fb8d87ada5dafa98b108195b259ada1c44d443 Mon Sep 17 00:00:00 2001 From: SteMIDIfactory <67951947+SteMIDIfactory@users.noreply.github.com> Date: Tue, 1 Dec 2020 21:25:11 +0100 Subject: [PATCH] New version of Tensorflow has different submodules I just added three lines of inactive code that should fix the issues in case someone has TF V2. I'm sorry I wasn't able to find a way to check the TF version within the script, that would work for everyone. In alternative, I would add a note to the readme --- deepbinner/classify.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deepbinner/classify.py b/deepbinner/classify.py index bcdf618..2981e98 100644 --- a/deepbinner/classify.py +++ b/deepbinner/classify.py @@ -21,9 +21,20 @@ import pathlib import h5py import numpy as np + +""" +##IF USING TENSORFLOW V2, PLEASE ACTIVATE THIS BLOCK OF CODE +from tensorflow.compat.v1.keras.models import load_model +import tensorflow.compat.v1.keras.backend as backend +import tensorflow.compat.v1 as tf +## +""" +##IF USING AN EARLIER VERSION OF TENSORFLOW, PLEASE ACTIVATE THIS BLOCK OF CODE from keras.models import load_model from keras import backend import tensorflow as tf +## + from .load_fast5s import find_all_fast5s, get_read_id_and_signal, determine_single_or_multi_fast5s from .trim_signal import normalise from .misc import print_summary_table