GithubHelp home page GithubHelp logo

face_editor's People

Contributors

qianqianjun avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

boragocode

face_editor's Issues

How to using

I using stylegan-encoder get latent,run test.py get error.
2021-05-20 20:18:58.677311: E tensorflow/stream_executor/cuda/cuda_driver.cc:828] failed to allocate 2.62G (2817366272 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
/home/zhy/Projects/2021.05/face_editor-main/test.py:66: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
stack_latents = np.stack(face_latent for _ in range(1)) # (1,512)
Traceback (most recent call last):
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call
return fn(*args)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1341, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: In[0] is not a matrix. Instead it has shape [1,18,512]
[[{{node G_mapping_1/_Run/G_mapping/Dense0/MatMul}}]]
[[G_mapping_1/_Run/G_mapping/dlatents_out/_1399]]
(1) Invalid argument: In[0] is not a matrix. Instead it has shape [1,18,512]
[[{{node G_mapping_1/_Run/G_mapping/Dense0/MatMul}}]]
0 successful operations.
0 derived errors ignored.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/zhy/Projects/2021.05/face_editor-main/test.py", line 73, in
main()
File "/home/zhy/Projects/2021.05/face_editor-main/test.py", line 67, in main
face_dlatent = Gs_network.components.mapping.run(stack_latents, None) #将潜在编码通过映射网络
File "/home/zhy/Projects/2021.05/face_editor-main/dnnlib/tflib/network.py", line 478, in run
mb_out = tf.get_default_session().run(out_expr, dict(zip(in_expr, mb_in)))
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 950, in run
run_metadata_ptr)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1173, in _run
feed_dict_tensor, options, run_metadata)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1350, in _do_run
run_metadata)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1370, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: In[0] is not a matrix. Instead it has shape [1,18,512]
[[node G_mapping_1/_Run/G_mapping/Dense0/MatMul (defined at :150) ]]
[[G_mapping_1/_Run/G_mapping/dlatents_out/_1399]]
(1) Invalid argument: In[0] is not a matrix. Instead it has shape [1,18,512]
[[node G_mapping_1/_Run/G_mapping/Dense0/MatMul (defined at :150) ]]
0 successful operations.
0 derived errors ignored.

Errors may have originated from an input operation.
Input Source operations connected to node G_mapping_1/_Run/G_mapping/Dense0/MatMul:
G_mapping_1/_Run/G_mapping/Dense0/mul (defined at :140)
G_mapping_1/_Run/G_mapping/PixelNorm/mul (defined at :233)

Input Source operations connected to node G_mapping_1/_Run/G_mapping/Dense0/MatMul:
G_mapping_1/_Run/G_mapping/Dense0/mul (defined at :140)
G_mapping_1/_Run/G_mapping/PixelNorm/mul (defined at :233)

Original stack trace for 'G_mapping_1/_Run/G_mapping/Dense0/MatMul':
File "/home/zhy/Projects/2021.05/face_editor-main/test.py", line 73, in
main()
File "/home/zhy/Projects/2021.05/face_editor-main/test.py", line 67, in main
face_dlatent = Gs_network.components.mapping.run(stack_latents, None) #将潜在编码通过映射网络
File "/home/zhy/Projects/2021.05/face_editor-main/dnnlib/tflib/network.py", line 453, in run
out_gpu = net_gpu.get_output_for(*in_gpu, return_as_list=True, **dynamic_kwargs)
File "/home/zhy/Projects/2021.05/face_editor-main/dnnlib/tflib/network.py", line 222, in get_output_for
out_expr = self._build_func(*final_inputs, **build_kwargs)
File "", line 415, in G_mapping
File "", line 150, in dense
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 2647, in matmul
a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 5925, in mat_mul
name=name)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3616, in create_op
op_def=op_def)
File "/home/zhy/anaconda3/envs/stylegan2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2005, in init
self._traceback = tf_stack.extract_stack()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.