Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about class weights #2

Open
clockwiser opened this issue Jun 10, 2017 · 0 comments
Open

about class weights #2

clockwiser opened this issue Jun 10, 2017 · 0 comments

Comments

@clockwiser
Copy link

In the source, class weights are used as below.

def get_model(
model_file, model_name, loss_file, loss_name, class_weight, n_encdec,
n_classes, in_channel, n_mid, train_depth=None, result_dir=None):
model = imp.load_source(model_name, model_file)
model = getattr(model, model_name)
loss = imp.load_source(loss_name, loss_file)
loss = getattr(loss, loss_name)

# Initialize
model = model(n_encdec, n_classes, in_channel, n_mid)
if train_depth:

model = loss(model, class_weight, train_depth)

Strangely, there is no example of setting loss and loss_name.
Without proper parameters, class weights should not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant