aniketmaurya / chitra

A multi-functional library for full-stack Deep Learning. Simplifies Model Building, API development, and Model Deployment.

Home Page:https://chitra.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: cannot import name 'show_batch' from 'chitra.dataloader'

roderick-liu opened this issue · comments

ubuntu 20.04
anconda env
install local packages
$ pip install .
Installing collected packages: chitra
Attempting uninstall: chitra
Found existing installation: chitra 0.2.0a1
Uninstalling chitra-0.2.0a1:
Successfully uninstalled chitra-0.2.0a1
Successfully installed chitra-0.2.0a1

python demo.py
import numpy as np
import chitra
from chitra.dataloader import Clf, show_batch
import matplotlib.pyplot as plt

from chitra.dataloader import Clf, show_batch
ImportError: cannot import name 'show_batch' from 'chitra.dataloader'

👋 @roderick-liu! Thank you for opening your first issue in this repo. We are so happy that you have decided to contribute and value your contribution. Please read these materials before proceeding: Contributing Guide and Code of Conduct.

hi @roderick-liu, now you can call show_batch method directly on the Clf object without the need to import that method.

import numpy as np
import chitra
from chitra.dataloader import Clf
import matplotlib.pyplot as plt

clf_dl = Clf()
data = clf_dl.from_folder(cat_dog_path, target_shape=(224, 224))
clf_dl.show_batch(8, figsize=(8, 8))

hope it helps 😄

thank you!