neuralchen / SimSwap

An arbitrary face-swapping framework on images and videos with one single trained model!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

num_samples should be a positive integer value, but got num_samples=0 #309

wuXiuSen opened this issue · comments

when i try train ,i get a error

...
AttributeError: 'EfficientNet' object has no attribute 'act1'

i solve it

get another error

num_samples should be a positive integer value, but got num_samples=0

i try follow way like Originally posted by @1YasserAmmar1 in #307 (comment)
...................
thin just change the train start code by add the batchsize value --batchSize 4
.............

!python train.py --name simswap224_test --batchSize 4 --gpu_ids 0 --dataset ./content/TrainingData/vggface2_crop_arcfacealign_224 --Gdeep Fals

it still error ,help

I've also encountered this error, and here I made a very stupid mistake.
If you're using a windows environment, don't use WinRAR to extract the dataset (I haven't tried other software, but WinRAR can extract a file but this file can't be used for training), use tar -xvzf path/to/vggface2_crop_arcfacealign_224.tar instead!

Here is the solution:

  1. "AttributeError: 'EfficientNet' object has no attribute 'act1'", it can be solved by @1YasserAmmar1 in #307
  2. "num_samples should be a positive integer value, but got num_samples=0", add this command before training,
    !mv /content/vggface2_crop_arcfacealign_224/ /content/TrainingData/vggface2_crop_arcfacealign_224

This bug in Colab script has been fixed, please try the new version Colab!