You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I have run the code on google colab for a dry run and it was working just fine. I am now running it on a GPU-enabled server. But getting this error. "ValueError: num_samples should be a positive integer value, but got num_samples=0".
I have ensured that the Videos/ folder and the 2 csvs are in the same folder from where I am running the python script.
I have a doubt if the BATCH SIZE and NUM_WORKERS can be the reason for this. And if yes, what should I change it to, increase or decrease?
I have attached screenshots and copied the content of the error (output.stdout) and the code in my python script which I run.
Please help, and thanks in advance!!!!
THE ERROR:
Traceback (most recent call last):
File "echoDynamic.py", line 18, in
run_test=True)
File "/home/ashivdeo/Echonet/Echonet/echonet/utils/segmentation.py", line 100, in run
mean, std = echonet.utils.get_mean_and_std(echonet.datasets.Echo(split="train"))
File "/home/ashivdeo/Echonet/Echonet/echonet/utils/init.py", line 103, in get_mean_and_std
dataset, batch_size=batch_size, num_workers=num_workers, shuffle=True)
File "/home/ashivdeo/Echonet/Echonet/test/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 270, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File "/home/ashivdeo/Echonet/Echonet/test/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 103, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
Hello. I have run the code on google colab for a dry run and it was working just fine. I am now running it on a GPU-enabled server. But getting this error. "ValueError: num_samples should be a positive integer value, but got num_samples=0".
I have ensured that the Videos/ folder and the 2 csvs are in the same folder from where I am running the python script.
I have a doubt if the BATCH SIZE and NUM_WORKERS can be the reason for this. And if yes, what should I change it to, increase or decrease?
I have attached screenshots and copied the content of the error (output.stdout) and the code in my python script which I run.
Please help, and thanks in advance!!!!
THE ERROR:
Traceback (most recent call last):
File "echoDynamic.py", line 18, in
run_test=True)
File "/home/ashivdeo/Echonet/Echonet/echonet/utils/segmentation.py", line 100, in run
mean, std = echonet.utils.get_mean_and_std(echonet.datasets.Echo(split="train"))
File "/home/ashivdeo/Echonet/Echonet/echonet/utils/init.py", line 103, in get_mean_and_std
dataset, batch_size=batch_size, num_workers=num_workers, shuffle=True)
File "/home/ashivdeo/Echonet/Echonet/test/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 270, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File "/home/ashivdeo/Echonet/Echonet/test/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 103, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
THE CODE:
import sys
sys.path.append("/home/ashivdeo/Echonet/Echonet/")
import echonet
echonet.utils.segmentation.run(
num_epochs=50,
modelname="deeplabv3_resnet50",
pretrained=False,
output=None,
device=None,
n_train_patients=None,
num_workers=0,
batch_size=1,
seed=0,
lr_step_period=None,
save_segmentation=True,
block_size=2,
run_test=True)
The text was updated successfully, but these errors were encountered: