This is where I put things I find useful that speed up my work with Machine Learning. Ever looked in your old projects to reuse those cool functions you created before? Well, this repo is designed to be a Python Library of functions I created in my previous project that can be reused. I also share some Notebooks Tutorials and Python Code Snippets.
Unique tokens in source (id) vocabulary: 1425
Unique tokens in target (ti) vocabulary: 1297
The problem comes when i tried to split train_data using BucketIterator.split(). When I want to print the value of _trainiterator, It says that it has no attribute 'i', eventough i had declare the fields. Here is my code to print it:
for data in train_iterator:
print(data.i)
The output of code above is below:
AttributeError Traceback (most recent call last)
<ipython-input-9-322cc3aa78d6> in <module>()
1 for data in train_iterator:
----> 2 print(data.i)
AttributeError: 'BucketIterator' object has no attribute 'i'
When i try just to print data, the result makes me more confuse:
I am very confuse, because i don’t know what key i should use for train iterator. Thank you for your help
I’m doing seq2seq machine translation on my own dataset. I have preproceed my dataset using this code.
The output of code above is below:
The problem comes when i tried to split train_data using BucketIterator.split(). When I want to print the value of _trainiterator, It says that it has no attribute 'i', eventough i had declare the fields. Here is my code to print it:
The output of code above is below:
When i try just to print data, the result makes me more confuse:![image](https://user-images.githubusercontent.com/24646371/131038503-e2e1dfd0-2508-4177-a66a-8a62648c0b15.png)
I am very confuse, because i don’t know what key i should use for train iterator. Thank you for your help