ValueError: cannot reshape array of size 4050 into shape (4,4,3,5,5,3)

Want to understand the training process better? Got tips for which model to use and when? This is the place for you


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for discussing tips and understanding the process involved with Training a Faceswap model.

If you have found a bug are having issues with the Training process not working, then you should post in the Training Support forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
phoenix
Posts: 2
Joined: Mon Sep 30, 2019 5:24 am
Has thanked: 2 times

ValueError: cannot reshape array of size 4050 into shape (4,4,3,5,5,3)

Post by phoenix »

I have 8 photos each for Input A and Input B.

When I try to train a model.

It gives and error below:

Code: Select all

09/30/2019 15:04:06 INFO     ===================================================
09/30/2019 15:04:06 INFO       Starting
09/30/2019 15:04:06 INFO       Press 'Terminate' to save and quit
09/30/2019 15:04:06 INFO     ===================================================
09/30/2019 15:04:07 INFO     Loading data, this may take a while...
09/30/2019 15:04:07 INFO     Loading Model from Original plugin...
09/30/2019 15:04:07 WARNING  No existing state file found. Generating.
09/30/2019 15:04:07 INFO     Opening device "opencl_intel_iris(tm)_plus_graphics_645.0"
09/30/2019 15:04:13 INFO     Creating new 'original' model in folder: '/Users/phoenix/MyProjects/model'
09/30/2019 15:04:13 INFO     Loading Trainer from Original plugin...
09/30/2019 15:04:13 INFO     Enabled TensorBoard Logging
09/30/2019 15:04:16 INFO     Analyzing Ops: 209 of 519 operations complete
09/30/2019 15:04:41 INFO     Analyzing Ops: 161 of 519 operations complete
09/30/2019 15:05:26 CRITICAL Error caught! Exiting...
09/30/2019 15:05:26 ERROR    Caught exception in thread: 'training_0'
09/30/2019 15:05:30 ERROR    Got Exception on main handler:
Traceback (most recent call last):
File "/Users/phoenix/MyProjects/faceswap/lib/cli.py", line 128, in execute_script
process.process()
File "/Users/phoenix/MyProjects/faceswap/scripts/train.py", line 109, in process
self.end_thread(thread, err)
File "/Users/phoenix/MyProjects/faceswap/scripts/train.py", line 135, in end_thread
thread.join()
File "/Users/phoenix/MyProjects/faceswap/lib/multithreading.py", line 111, in join
raise thread.err[1].with_traceback(thread.err[2])
File "/Users/phoenix/MyProjects/faceswap/lib/multithreading.py", line 37, in run
self._target(*self._args, **self._kwargs)
File "/Users/phoenix/MyProjects/faceswap/scripts/train.py", line 160, in training
raise err
File "/Users/phoenix/MyProjects/faceswap/scripts/train.py", line 150, in training
self.run_training_cycle(model, trainer)
File "/Users/phoenix/MyProjects/faceswap/scripts/train.py", line 232, in run_training_cycle
trainer.train_one_step(viewer, timelapse)
File "/Users/phoenix/MyProjects/faceswap/plugins/train/trainer/_base.py", line 211, in train_one_step
raise err
File "/Users/phoenix/MyProjects/faceswap/plugins/train/trainer/_base.py", line 201, in train_one_step
samples = self.samples.show_sample()
File "/Users/phoenix/MyProjects/faceswap/plugins/train/trainer/_base.py", line 417, in show_sample
figure = figure.reshape((width, height) + figure.shape[1:])
ValueError: cannot reshape array of size 4050 into shape (4,4,3,5,5,3)
09/30/2019 15:05:30 CRITICAL An unexpected crash has occurred. Crash report written to '/Users/phoenix/MyProjects/faceswap/crash_report.2019.09.30.150530448791.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting
Process exited.

My OS is macOS Mojave
Hope somebody can help me, thanks!

by torzdf » Mon Sep 30, 2019 10:19 am

8 Photos is not nearly enough. See https://faceswap.dev/forum/app.php/faqpage

Secondly, you will be training on CPU, which will take weeks.

Thirdly, you have setup Faceswap wrong. You have said "Yes" to AMD somewhere along the lines, when you should have said "No".

Go to full post
User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: ValueError: cannot reshape array of size 4050 into shape (4,4,3,5,5,3)

Post by torzdf »

8 Photos is not nearly enough. See https://faceswap.dev/forum/app.php/faqpage

Secondly, you will be training on CPU, which will take weeks.

Thirdly, you have setup Faceswap wrong. You have said "Yes" to AMD somewhere along the lines, when you should have said "No".

My word is final

Locked