I have 2 dataframes one is a training set and the other is a test set. I have called them train and test respectively. I want to use the test dataframe to test my model after training on the train data set. Is this the correct way of doing this?
tfms = get_transforms(do_flip=True, max_lighting=0.1, max_zoom=1.05, max_warp=0.)
data = (ImageItemList.from_df(train,path=path,cols='location',folder='')
.random_split_by_pct(0.1)
.label_from_df(cols='class_id')
.transform(tfms, size=100)
.databunch())
#get test data
test_data = (ImageItemList.from_df(test,path=path,cols='location',folder='')
.no_split()
.label_from_df(cols='class_id')
.transform(tfms, size=100)
.databunch())
learn = create_cnn(data, models.resnet34, metrics=error_rate, pretrained=False)
learn.lr_find()
learn.recorder.plot()
learn.fit_one_cycle(4,1e-2)
learn.validate(test_data.train_dl,metrics=[accuracy])
What does learn.validate actually spit out? is it just the loss and accuracy?
I assume I can use something similar for cross validation