Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting ValueError: operands could not be broadcast together with shapes (144,144,3) (72,72,3) error #2

Closed
Greywolf22 opened this issue Apr 20, 2019 · 4 comments

Comments

@Greywolf22
Copy link

Tried this today and got the error below

Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
Time to backup: 10 hours
/content
Running trainer.

Loading model...

Model first run. Enter model options as default for each run.
Write preview history? (y/n ?:help skip:n) : y
Target iteration (skip:unlimited/default) : 
0
Batch_size (?:help skip:0) : 
0
Feed faces to network sorted by yaw? (y/n ?:help skip:n) : n
Flip faces randomly? (y/n ?:help skip:y) : n
Src face scale modifier % ( -30...30, ?:help skip:0) : 
0
Resolution ( 64-256 ?:help skip:128) : 144
Half or Full face? (h/f, ?:help skip:f) : 
f
Learn mask? (y/n, ?:help skip:y) : 
y
Optimizer mode? ( 1,2,3 ?:help skip:1) : 
1
AE architecture (df, liae ?:help skip:df) : 
df
AutoEncoder dims (32-1024 ?:help skip:512) : 
512
Encoder dims per channel (21-85 ?:help skip:42) : 
42
Decoder dims per channel (10-85 ?:help skip:21) : 
21
Remove gray border? (y/n, ?:help skip:n) : 
n
Use multiscale decoder? (y/n, ?:help skip:n) : y
Use pixel loss? (y/n, ?:help skip: n ) : 
n
Face style power ( 0.0 .. 100.0 ?:help skip:0.00) : 
0.0
Background style power ( 0.0 .. 100.0 ?:help skip:0.00) : 
0.0
Using TensorFlow backend.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Loading: 100% 6791/6791 [00:06<00:00, 1049.77it/s]
Loading: 100% 6791/6791 [00:05<00:00, 1145.45it/s]
===== Model summary =====
== Model name: SAE
==
== Current iteration: 0
==
== Model options:
== |== write_preview_history : True
== |== batch_size : 4
== |== sort_by_yaw : False
== |== random_flip : False
== |== resolution : 144
== |== face_type : f
== |== learn_mask : True
== |== optimizer_mode : 1
== |== archi : df
== |== ae_dims : 512
== |== e_ch_dims : 42
== |== d_ch_dims : 21
== |== remove_gray_border : False
== |== multiscale_decoder : True
== |== pixel_loss : False
== |== face_style_power : 0.0
== |== bg_style_power : 0.0
== Running on:
== |== [0 : Tesla T4]
=========================
Starting. Press "Enter" to stop training and save model.
Error: operands could not be broadcast together with shapes (144,144,3) (72,72,3) 
Traceback (most recent call last):
  File "/content/DeepFaceLab/mainscripts/Trainer.py", line 93, in trainerThread
    iter, iter_time = model.train_one_iter()
  File "/content/DeepFaceLab/models/ModelBase.py", line 376, in train_one_iter
    plist += [ (self.get_previews()[0][1], self.get_strpath_storage_for_file('preview.jpg') ) ]
  File "/content/DeepFaceLab/models/ModelBase.py", line 274, in get_previews
    return self.onGetPreview ( self.last_sample )
  File "/content/DeepFaceLab/models/Model_SAE/Model.py", line 411, in onGetPreview
    ar = S[i]*test_S_m[i], SS[i], D[i]*test_D_m[i], DD[i]*DDM[i], SD[i]*(DDM[i]*SDM[i])
ValueError: operands could not be broadcast together with shapes (144,144,3) (72,72,3) 
Done.
/usr/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown
  len(cache))
/usr/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown
  len(cache))
/usr/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown
  len(cache))
/usr/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown
  len(cache))
@chervonij
Copy link
Owner

Yes, I checked your settings with my dataset. The same mistake. But it's not about DFL-Colab. It seems that this is due to the resolution of 144

@chervonij
Copy link
Owner

It's bugreport for @iperov

@iperov
Copy link

iperov commented Apr 20, 2019

fixed

@Greywolf22
Copy link
Author

Thx. Its working now.

RickyZi pushed a commit to RickyZi/DeepFaceLab-gradient that referenced this issue Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants