Comments (26)
maybe it's from keras bug
from deepfacelab.
@oracle9i88 can you attach error log & output conda list -n deepfacelab
(or other name of env).
from deepfacelab.
conda list -n deepfacelab
packages in environment at /home/oracle9i/anaconda3/envs/deepfacelab:
Name Version Build Channel
absl-py 0.4.1
astor 0.7.1
bleach 1.5.0
ca-certificates 2018.03.07 0
certifi 2018.8.24 py36_1
cloudpickle 0.5.5
cudatoolkit 9.0 h13b8566_0
cudnn 7.1.2 cuda9.0_0
cycler 0.10.0
dask 0.19.1
decorator 4.3.0
dlib 19.10.0
gast 0.2.0
grpcio 1.14.2
h5py 2.7.1
html5lib 0.9999999
Keras 2.1.6
keras-contrib 2.0.8
kiwisolver 1.0.1
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libstdcxx-ng 8.2.0 hdf63c60_1
Markdown 2.6.11
matplotlib 2.2.3
ncurses 6.1 hf484d3e_0
networkx 2.1
numpy 1.15.1
opencv-python 3.4.0.12
openssl 1.0.2p h14c3975_0
pathlib 1.0.1
Pillow 5.2.0
pip 10.0.1 py36_0
protobuf 3.6.1
pyparsing 2.2.0
python 3.6.6 hc3d631a_0
python-dateutil 2.7.3
pytz 2018.5
PyWavelets 1.0.0
PyYAML 3.13
readline 7.0 h7b6447c_5
scandir 1.6
scikit-image 0.14.0
scipy 1.1.0
setuptools 40.2.0 py36_0
six 1.11.0
sqlite 3.24.0 h84994c4_0
tensorboard 1.8.0
tensorflow-gpu 1.8.0
termcolor 1.1.0
tk 8.6.8 hbc83047_0
toolz 0.9.0
tqdm 4.25.0
Werkzeug 0.14.1
wheel 0.31.1 py36_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 ha838bed_2
from deepfacelab.
Running trainer.
Loading model...
2018-09-11 09:00:10.118262: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-09-11 09:00:10.482154: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-09-11 09:00:10.483137: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX 1060 major: 6 minor: 1 memoryClockRate(GHz): 1.6705
pciBusID: 0000:01:00.0
totalMemory: 5.93GiB freeMemory: 5.66GiB
2018-09-11 09:00:10.483154: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-09-11 09:00:16.779707: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-09-11 09:00:16.779774: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0
2018-09-11 09:00:16.779832: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N
2018-09-11 09:00:16.800820: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5443 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060, pci bus id: 0000:01:00.0, compute capability: 6.1)
Using TensorFlow backend.
Error: No module named 'keras_contrib'
Traceback (most recent call last):
File "/home/oracle9i/DeepFaceLab/mainscripts/Trainer.py", line 41, in trainerThread
**in_options)
File "/home/oracle9i/DeepFaceLab/models/ModelBase.py", line 106, in init
self.keras_contrib = gpufmkmgr.import_keras_contrib()
File "/home/oracle9i/DeepFaceLab/gpufmkmgr/gpufmkmgr.py", line 107, in import_keras_contrib
import keras_contrib
ModuleNotFoundError: No module named 'keras_contrib'
from deepfacelab.
sorry, I don't know why the error message is changing...
from deepfacelab.
oracle9i88, the error message is saying you need to install keras-contrib, not just keras. From the command prompt:
pip install git
git clone https://github.com/keras-team/keras-contrib.git
cd keras-contrib
python setup.py install
from deepfacelab.
thanks, I will try it tonight
from deepfacelab.
Loading model...
/home/oracle9i/anaconda3/envs/deepfacelab/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
2018-09-11 16:35:23.880528: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-09-11 16:35:24.031774: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-09-11 16:35:24.032628: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX 1060 major: 6 minor: 1 memoryClockRate(GHz): 1.6705
pciBusID: 0000:01:00.0
totalMemory: 5.93GiB freeMemory: 5.67GiB
2018-09-11 16:35:24.032644: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-09-11 16:35:24.260085: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-09-11 16:35:24.260109: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0
2018-09-11 16:35:24.260116: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N
2018-09-11 16:35:24.260299: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5445 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060, pci bus id: 0000:01:00.0, compute capability: 6.1)
Using TensorFlow backend.
Error: cannot import name 'normalize_data_format'
Traceback (most recent call last):
File "/home/oracle9i/DeepFaceLab/mainscripts/Trainer.py", line 41, in trainerThread
**in_options)
File "/home/oracle9i/DeepFaceLab/models/ModelBase.py", line 106, in init
self.keras_contrib = gpufmkmgr.import_keras_contrib()
File "/home/oracle9i/DeepFaceLab/gpufmkmgr/gpufmkmgr.py", line 107, in import_keras_contrib
import keras_contrib
File "/home/oracle9i/anaconda3/envs/deepfacelab/lib/python3.6/site-packages/keras_contrib/init.py", line 4, in
from . import layers
File "/home/oracle9i/anaconda3/envs/deepfacelab/lib/python3.6/site-packages/keras_contrib/layers/init.py", line 3, in
from .convolutional import *
File "/home/oracle9i/anaconda3/envs/deepfacelab/lib/python3.6/site-packages/keras_contrib/layers/convolutional.py", line 15, in
from keras.backend.common import normalize_data_format
ImportError: cannot import name 'normalize_data_format'
from deepfacelab.
Are you running Ubuntu 16.04 or Windows 10? Per stackoverflow, there is apparently some incompatibility between the latest keras-contrib and keras. Try upgrading keras to version 2.2.2:
pip install -q keras==2.2.2
You can always revert to the original keras version by running: pip install -q keras==2.1.6
from deepfacelab.
thank you very much
I running Ubuntu 16.04
after pip install keras==2.2.2 but....
Loading model...
/home/oracle9i/anaconda3/envs/deepfacelab/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
2018-09-12 00:33:25.784450: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-09-12 00:33:26.252499: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-09-12 00:33:26.253368: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX 1060 major: 6 minor: 1 memoryClockRate(GHz): 1.6705
pciBusID: 0000:01:00.0
totalMemory: 5.93GiB freeMemory: 5.60GiB
2018-09-12 00:33:26.253383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-09-12 00:33:33.999898: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-09-12 00:33:33.999926: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0
2018-09-12 00:33:33.999937: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N
2018-09-12 00:33:34.029923: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5375 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060, pci bus id: 0000:01:00.0, compute capability: 6.1)
Using TensorFlow backend.
Error: module 'keras.engine' has no attribute 'topology'
Traceback (most recent call last):
File "/home/oracle9i/DeepFaceLab/mainscripts/Trainer.py", line 41, in trainerThread
**in_options)
File "/home/oracle9i/DeepFaceLab/models/ModelBase.py", line 108, in init
self.onInitialize(**in_options)
File "/home/oracle9i/DeepFaceLab/models/Model_H128/Model.py", line 25, in onInitialize
bgr_shape, mask_shape, self.encoder, self.decoder_src, self.decoder_dst = self.Build(self.created_vram_gb)
File "/home/oracle9i/DeepFaceLab/models/Model_H128/Model.py", line 187, in Build
return bgr_shape, mask_shape, Encoder(bgr_shape), Decoder(), Decoder()
File "/home/oracle9i/DeepFaceLab/models/Model_H128/Model.py", line 144, in Encoder
x = upscale(self.keras, x, 512)
File "/home/oracle9i/DeepFaceLab/nnlib/init.py", line 178, in upscale
x = PixelShufflerClass(keras)()(x)
File "/home/oracle9i/DeepFaceLab/nnlib/init.py", line 87, in PixelShufflerClass
class PixelShuffler(keras.engine.topology.Layer):
AttributeError: module 'keras.engine' has no attribute 'topology'
from deepfacelab.
Well, my suggestions don't seem to be helping (: How about starting fresh, creating a new python environment and running pip install -r requirements-gpu-cuda9-cudnn7.txt? I've got the code running under Ubuntu 18.04 and Windows 10, and I'm running Anaconda, too.
from deepfacelab.
oh, thanks.
from deepfacelab.
Ubuntu 18.04
pip install -r requirements-gpu-duda9-dudnn7.txt
It's doesn't work.
still cannot import name 'normalize_data_format'
from deepfacelab.
maybe u use the deepfacelab early version?
from deepfacelab.
maybe waiting for keras
still cannot work
from deepfacelab.
This is where I read about the error message you're getting:
https://stackoverflow.com/questions/51652690/importerror-cannot-import-name-normalize-data-format.
my pip freeze shows:
keras==2.1.6 and
keras-contrib==2.08
I'm training with the latest code right now. Try pip freeze to check keras versions. If not the same, try pip install --upgrade keras==2.1.6 and pip install --upgrade keras-contrib==2.08.
from deepfacelab.
thank u very much.
I fix it by your clue.
Do u have use the avatar model?
from deepfacelab.
I've tried all the models except Avatar, H128 works best for me, here's a sample: https://youtu.be/Cs1SkB_8PEo.
from deepfacelab.
amazing!!!!!!!!!!!
I will try the Avatar
from deepfacelab.
I'm getting the same ImportError: cannot import name 'normalize_data_format'
error when I try training. I'm on Windows 10, using Anaconda prompt, with a GTX 1070. Following the suggestions here hasn't helped - switching to Keras 2.2.2 gives the same AttributeError: module 'keras.engine' has no attribute 'topology'
message, and trying keras 2.1.6 and keras-contrib 2.0.8 give the same 'normalize_data_format' error. conda list -n gives the following versions:
absl-py 0.4.1
astor 0.7.1
blas 1.0 mkl
bleach 1.5.0
certifi 2018.8.24 py36_1
cloudpickle 0.5.5
Cython 0.28.5
dask 0.19.1
decorator 4.3.0
gast 0.2.0
grpcio 1.15.0
h5py 2.7.1
html5lib 0.9999999
icc_rt 2017.0.4 h97af966_0
intel-openmp 2018.0.3 0
Keras 2.1.6
Keras-Applications 1.0.4
keras-contrib 2.0.8
Keras-Preprocessing 1.0.2
Markdown 2.6.11
mkl 2018.0.3 1
mkl_fft 1.0.4 py36h1e22a9b_1
mkl_random 1.0.1 py36h77b88f5_1
networkx 2.1
numpy 1.15.1 py36ha559c80_0
numpy-base 1.15.1 py36h8128ebf_0
opencv-python 3.4.0.12
pathlib 1.0.1
Pillow 5.2.0
pip 18.0
pip 10.0.1 py36_0
protobuf 3.6.1 pip>
python 3.6.6 hea74fb7_0
PyWavelets 1.0.0
pyyaml 3.13 py36hfa6e2cd_0
scandir 1.6
scikit-image 0.14.0
scipy 1.1.0
setuptools 40.2.0 py36_0
six 1.11.0
tensorboard 1.8.0
tensorflow-gpu 1.8.0
termcolor 1.1.0
toolz 0.9.0
tqdm 4.26.0
vc 14 h0510ff6_3
vs2015_runtime 14.0.25123 3
Werkzeug 0.14.1
wheel 0.31.1 py36_0
wincertstore 0.2 py36h7fe50ca_0
yaml 0.1.7 hc54c509_2
from deepfacelab.
@jslurm for Windows 10 you can use prebuilt standalone package
from deepfacelab.
artificially-ai/keras-contrib@0dac2da
follow the files update
from deepfacelab.
@iperov Thanks. Apologies in advance, but I'm not very well versed in this stuff. I saw the link, but it went to a Russian forum site and my browser was having trouble translating, so I didn't want to go clicking random links. I followed steps for manual installation from other discussions & am able to extract just fine. Just trying to get training to work. I had the same issue with the deepfakes repo, that was fixed by installing keras 2.2.0 and keras_vggface, but 2.2.0 doesn't seem to change anything here.
@oracle9i88 Sorry, I'm not quite sure what to do with this. Is this something to download? Is there a script somewhere I'm supposed to change manually?
from deepfacelab.
@jslurm magnet link to direct download windows build
magnet:?xt=urn:btih:40E972A104C99DF59EB1C6087256A4CBF9EE7C92
from deepfacelab.
@iperov Got it now. Training works! I'd gotten so used to using scripts for the other repo but the .bat files make it super easy. Thanks!!
from deepfacelab.
@pandamax stop flood. All you need just update to latest DFL.
from deepfacelab.
Related Issues (20)
- error when extracting deepfake files zip after downloading
- Can't parse "center" error immediately upon starting training
- Head Replace - Crop size for face extraction
- Extract xseg masks?
- Problems Relative to installation of "DeepFaceLab"
- The problem of face recognition in lateral and lower projections
- traceback(most recent call last) HOT 1
- .
- Test
- Training speed.
- Training speed
- Eye and mouth priority bad after 144k
- ask help for the model file
- XSeg training stops after loading all samples (no errors)
- not working on AMD GPU
- Merger Issues All of a Sudden?!
- Merger Issues All of a Sudden?!
- Don't work bat file HOT 1
- it no longer will extract face set data even for the default face sets
- Error: OOM when allocating tensor of shape PLEASE HELP!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepfacelab.