if "tensorlayer" in package.project_name and "site-packages" in package.location:
TL_is_installed = True
if TF_is_installed: // The tensorlayer package is installed
import tensorflow
from . import activation
from . import cost
from . import files
from . import iterate
from . import layers
from . import models
from . import utils
from . import visualize
from . import prepro
from . import nlp
from . import rein
from . import distributed
// alias
act = activation
vis = visualize
global_flag = {}
global_dict = {}
elif TL_is_installed:
install_instr = "Please make sure you install a recent enough version of TensorFlow."
raise ImportError("__init__.py : Could not import TensorFlow. {}".format(install_instr))
// Use the following formating: (major, minor, patch, prerelease)
VERSION = (1, 8, 5, "rc2")
__shortversion__ = ".".join(map(str, VERSION[:3]))
After Change
for package in installed_packages:
if "tensorlayer" in package.project_name and "site-packages" in package.location:
raise ImportError("__init__.py : Could not import TensorLayer.\nError: {}".format(e))
// Use the following formating: (major, minor, patch, prerelease)
VERSION = (1, 8, 5, "rc2")
__shortversion__ = ".".join(map(str, VERSION[:3]))