simontomaskarlsson/CycleGAN-Keras

from keras.engine.topology import Networks

TJUXJH opened this issue · 1 comments

Hi, after I run the main.py :

Using TensorFlow backend.
Traceback (most recent call last):
File "main.py", line 9, in
from keras.engine.topology import Network

ImportError: cannot import name 'Network'

something in the keras.engine.topology without Network

dir(keras.engine.topology)
['Container', 'Input', 'InputLayer', 'InputSpec', 'K', 'Layer', 'Node', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'spec', '_collect_input_shape', '_collect_previous_mask', '_is_all_none', '_object_list_uid', '_to_list', '_to_snake_case', 'absolute_import', 'ask_to_proceed_with_overwrite', 'conv_utils', 'copy', 'division', 'get_source_inputs', 'h5py', 'has_arg', 'initializers', 'interfaces', 'json', 'load_weights_from_hdf5_group', 'load_weights_from_hdf5_group_by_name', 'np', 'os', 'preprocess_weights_for_loading', 'print_function', 'print_layer_summary', 're', 'save_weights_to_hdf5_group', 'warnings', 'yaml', 'zip']

Hi @TJUXJH,
This might depend on the Keras version you are using. Look into if the keras.engine.topology has depricated.

You can force install an earlier version by:
pip install 'keras==2.1.6' --force-reinstall
Where 2.1.6 is a suitable example.