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

Closed
opened 2023-06-26 18:51:44 +02:00 by wuXiuSen · 5 comments
wuXiuSen commented 2023-06-26 18:51:44 +02:00 (Migrated from github.com)

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 https://github.com/neuralchen/SimSwap/issues/307#issuecomment-1200092061
...................
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

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 https://github.com/neuralchen/SimSwap/issues/307#issuecomment-1200092061 ................... 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
SassyRong commented 2023-07-25 11:35:20 +02:00 (Migrated from github.com)

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!

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!
shidalao commented 2023-08-10 11:06:30 +02:00 (Migrated from github.com)

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
Here is the solution: 1. "AttributeError: 'EfficientNet' object has no attribute 'act1'", it can be solved by @1YasserAmmar1 in [#307](https://github.com/neuralchen/SimSwap/issues/307#issuecomment-1200092061) 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`
neuralchen commented 2023-09-27 03:43:49 +02:00 (Migrated from github.com)

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

This bug in Colab script has been fixed, please try the new version Colab!
jigneshk5 commented 2024-08-24 13:57:14 +02:00 (Migrated from github.com)

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!

image
In collab, we are getting this error when trying to extract the training dataset

> 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! ![image](https://github.com/user-attachments/assets/97199773-cd3d-480e-9b50-66d883d11b41) In collab, we are getting this error when trying to extract the training dataset
L-XY-L commented 2024-10-25 16:31:29 +02:00 (Migrated from github.com)

AttributeError: 'EfficientNet' object has no attribute 'act1',How did this work out, please?

AttributeError: 'EfficientNet' object has no attribute 'act1',How did this work out, please?
Sign in to join this conversation.