Comments (3)
Also let me know if there is a better spot to discuss topics like this...
from course22p2.
Probably pinging Jeremy on discord make sense. I like the idea of putting n_inp on learn next to the batch as it can be used in other places as well. My mixup implementation assumes right now batch has only 2 elements.
from course22p2.
I'm playing around with using miniai on different types of tasks. Currently, a siamese network (same/not same) with two input images (and will probably be trying out object detection next which will require multiple y values).
I'm using TrainCB, which allows you to specify n_inp=2. But no support for n_inp > 1 in MetricsCB. I'd be happy to do a pull request but wanted to bounce a few ideas around.
Option 1) just push n_inp into learner and MetricsCB could be modified to honor that Option 2) add get_x and get_y methods to Learner; TrainCB could patch those (before_fit) for n_inp>1; and MetricsCB would just do *learn.get_y() to evaluate loss
option 1 is probably a reasonable quick workaround for now. option 2 is a few more changes to the core learner, but probably better?
Thoughts? Thanks John
I'm playing around with using miniai on different types of tasks. Currently, a siamese network (same/not same) with two input images (and will probably be trying out object detection next which will require multiple y values).
I'm using TrainCB, which allows you to specify n_inp=2. But no support for n_inp > 1 in MetricsCB. I'd be happy to do a pull request but wanted to bounce a few ideas around.
Option 1) just push n_inp into learner and MetricsCB could be modified to honor that Option 2) add get_x and get_y methods to Learner; TrainCB could patch those (before_fit) for n_inp>1; and MetricsCB would just do *learn.get_y() to evaluate loss
option 1 is probably a reasonable quick workaround for now. option 2 is a few more changes to the core learner, but probably better?
Thoughts? Thanks John
I agree. Here's my solution , change it to "*x, y = to_cpu(learn.batch)", and "self.loss.update(to_cpu(learn.loss), weight=len(y))"
from course22p2.
Related Issues (9)
- cannot install HOT 2
- Notebook 4 - one s too many in the fit function before the random sampling section HOT 4
- Release date in sight? HOT 1
- Missing train attribute in WandBCB
- Two definitions of conv imported in resnet.py
- RecorderCB plt not defined error
- Performance difference in lin_grad function (elementwise multiplication vs. dot product) HOT 1
- Using Activationstats consuming Ram (A lot)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from course22p2.