Split_data,, can't multiply sequence by non-int of type 'float'

Hello,
I have an issue with the cell of split data, the TypeError said "can’t multiply sequence by non-int of type ‘float’ "
what’s wrong? could anybody help me, please?

Please ensure that the number of items you want to sample is an integer and the items you want to sample is a sequence like list / set.

can I send you my notebook to check it? I still have problem with it. The output said it just 17 images for training and validation in each animal. It’s different with the expected output…

Please click my name and message your notebook as an attachment.

Inside split_data, why are you using root_dir? This is the docstring for the function:

  """
  Splits the data into train and test sets
  
  Args:
    SOURCE_DIR (string): directory path containing the images
    TRAINING_DIR (string): directory path to be used for training
    VALIDATION_DIR (string): directory path to be used for validation
    SPLIT_SIZE (float): proportion of the dataset to be used for training
    
  Returns:
    None
  """

This what the output said when I changed

NameError Traceback (most recent call last)
in ()
17
18 files =
—> 19 for filename in os.listdir(SOURCE_DIR):
20 file = SOURCE_DIR + filename
21 if os.path.getsize(file) > 0:

NameError: name ‘SOURCE_DIR’ is not defined

I had the same issue and solve it by adding the int( ) to transfor int type after you *SPLIT_SIZE ,
hope it can help you