Skip to content

TypeError: validation_step() missing 1 required positional argument: 'dataloader_nb' #14238

Discussion options

You must be logged in to vote

if you are using a single val dataloader:

def validation_step(self, batch, batch_idx):

if you are using multiple val dataloader:

def validation_step(self, batch, batch_idx, dataloader_idx):

for consistency, you can just do

def validation_step(self, batch, batch_idx, dataloader_idx=0):

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MooreManor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment