-
-
Save harshnandwana/d7a04cb96d0cb0c2b4c3302b0155c4ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
train_dataset = Dataset(df_train) | |
test_dataset = Dataset(df_test) | |
BATCH_SIZE=32 | |
train_dataloader = Dataloder(train_dataset, batch_size=BATCH_SIZE, shuffle=True) | |
test_dataloader = Dataloder(test_dataset, batch_size=BATCH_SIZE, shuffle=True)] | |
#========================================================= View Output | |
rows,cols=3,3 | |
fig=plt.figure(figsize=(10,10)) | |
for i in range(1,rows*cols+1): | |
index=np.random.randint(1,len(train_dataloader)) | |
#index=i+20 | |
fig.add_subplot(rows,cols,i) | |
img_path=train_dataloader[index-1][0][0] | |
msk_path=train_dataloader[index-1][1][0] | |
plt.imshow(np.reshape(img_path,(256,256)),cmap='Greens') | |
#plt.imshow(msk_path,alpha=0.5, cmap="gray") | |
plt.show() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment