-
Notifications
You must be signed in to change notification settings - Fork 271
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
change DataIterator to work on get_example and get_batch and add methods... #40
Conversation
…ods and batch attributes to Transformer object
Just to know if the code was okay. Also do I have to call get_epoch_iterator on every transformer class with example or batch stream for tests ? (Have also to correct indentation error) |
@@ -23,9 +23,15 @@ def __iter__(self): | |||
|
|||
def __next__(self): | |||
if self.request_iterator is not None: | |||
data = self.data_stream.get_data(next(self.request_iterator)) | |||
if self.data_stream.batch : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm, maybe it's better to move this logic to the Transformer
base class. That way child classes can override it if necessary and don't need to duplicate methods if the implementation for batch/example is the same.
There are a few transformers which can share the implementation of their
Hope that was clear |
def __init__(self, data_stream, mapping, add_sources=None): | ||
super(Mapping, self).__init__(data_stream) | ||
def __init__(self, data_stream, mapping, batch=False, add_sources=None): | ||
super(Mapping, self).__init__(data_stream, batch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can remove it here too.
Seems like there's a merge conflict, so you'll need to rebase. Let me know if you need some help doing that! |
…a_from_example, get_batch, swap Unpack and Batch, remove batch from the inputs of the classes derived from Transformer
…to CCW_Transformer Conflicts: fuel/transformers/__init__.py
@bartvm it is eventually done ! |
@bartvm do u know what is coverage test in the github tests ? |
Coverage is the number of lines of code that are run by unit tests divided by the total number of lines of code. If it decreases it means that this percentage dropped. In this case it's because you added 9 new lines of code to |
@bartvm is there any way to see which lines are not covered by the tests ? (sources are not available) |
Not sure, never seen that before! It might be because of the merge conflicts earlier. You might want to try rebasing? |
@@ -22,10 +22,14 @@ class Transformer(AbstractDataStream): | |||
this attribute. Use it to access data from the wrapped data stream | |||
by calling ``next(self.child_epoch_iterator)``. | |||
|
|||
batch : boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
batch_input
instead of batch
, and there should be no new line between parameter descriptions.
Wait, I just realised you're working in #45 now, so I'll close this one then? |
yes please. And by the way thanks for the dropout on blocks, it is really 2015-03-20 13:48 GMT-04:00 Bart van Merriënboer notifications@github.com:
|
... and batch attributes to Transformer object