question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make ignite utils public

See original GitHub issue

When using a dataset which returns a tuple of more than 2 values, you have to implement your own _prepare_batch function. Let’s say we’re using this function:

def _prepare_batch(batch, dev=None, non_blocking=False):
    x, instance, boxes = batch

    return (convert_tensor(x, device=dev, non_blocking=non_blocking),
            convert_tensor(instance, device=dev, non_blocking=non_blocking),
            convert_tensor(boxes, device=dev, non_blocking=non_blocking))

As in the original _prepare_batch function used in create_supervised_trainer we’re using the convert_tensor function. This function is located in _utils.py resulting in a protected member access warning. This file has some useful and commonly used methods, so it would be nice if it was public instead.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vfdev-5commented, Jan 11, 2019

@anmolsjoshi thanks! my bad, I deleted fork’s branch and that closed the PR. I thought we’ve merged it.

0reactions
anmolsjoshicommented, Jan 11, 2019

@vfdev-5 any reason #396 was closed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ignite/utils.py at master · pytorch/ignite - GitHub
High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently. - ignite/utils.py at master · pytorch/ignite.
Read more >
Configuring Logging | Ignite Documentation
util.logging.properties as the default logging configuration file and outputs all messages to log files in the $IGNITE_HOME/work/log directory. You ...
Read more >
org.apache.ignite.internal.util.IgniteUtils java code examples
Gets all direct marshallable classes. * First classes will be classes from {@code classesOrder} with same order * as ordered values.
Read more >
ignite.utils — PyTorch-Ignite v0.4.10 Documentation
High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.
Read more >
Failed to Create Ignite Component when running Apache ...
URLClassLoader; import java.util.StringTokenizer; public class App { public static void main( String[] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found