Skip to content
Discussion options

You must be logged in to vote

@prateeky2806 Making it an optional keyword argument will avoid the error?

-def validation_step(self, batch, batch_idx, dataloader_idx):
-    if dataloader_idx == 0:
+def validation_step(self, batch, batch_idx, dataloader_idx=None):
+    if dataloader_idx == 0 or dataloader_idx is None:
        ...

    elif dataloader_idx == 1:
        ...

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@prateeky2806
Comment options

@akihironitta
Comment options

@prateeky2806
Comment options

Answer selected by prateeky2806
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment