# batched ## wikipedia (a model) epoki zwiększają się stopniowo według wzoru EPOCHS + int(p/2) gdzie p to indeks batcha. (2,12) BATCH_SIZE = 64 EPOCHS = 2 LATENT_DIM = 400 LATENT_DIM_DECODER = 400 # idea: make it different to ensure things all fit together properly! NUM_SAMPLES = 100000 NUM_PARTS = 20 #number of batches to divide samples to MAX_SEQUENCE_LENGTH = 100 MAX_NUM_WORDS = 20000 EMBEDDING_DIM = 100 ![](https://i.imgur.com/wGuqF37.png) ``` Input sentence: This problem can be overcome in a number of ways, including the use of a relatively short length of fiber that has the opposite refractive index gradient. = Predicted translation: this problem can be difficult in a number of certain including the of a maximum of fiber that has the opposite index is Actual translation: This problem can be overcome in a number of ways, including the use of a relatively short length of fiber that has the opposite refractive index gradient. = <eos> Continue? [Y/n] Input sentence: : How George Boole and Claude Shannon Create the Information Age, Princeton University Press, 2013, ISBN Predicted translation: we george and birmingham and the secure european street prize in american american Actual translation: : How George Boole and Claude Shannon Create the Information Age, Princeton University Press, 2013, ISBN <eos> Continue? [Y/n] Input sentence: In other words, when someone uses a telephone, the speaker's voice is "encoded" then reconstructed for the person on the other end. Predicted translation: in other words, when if a telephone the medium is specified called for the person on the other end. Actual translation: In other words, when someone uses a telephone, the speaker's voice is "encoded" then reconstructed for the person on the other end. <eos> Continue? [Y/n] Input sentence: The ARPANET was a research project that was communications-oriented, rather than user-oriented in design. Predicted translation: the broadcasting was a research project that was network rather than user with technology. Actual translation: The ARPANET was a research project that was communications-oriented, rather than user-oriented in design. <eos> Continue? [Y/n] Input sentence: Websites are often created using content management software with, initially, very little content. Predicted translation: among such as uses security management software with initially very larger functions. Actual translation: Websites are often created using content management software with, initially, very little content. <eos> Continue? [Y/n] Input sentence: Promotional trailers arrive on a separate hard drive and range between 200 GB and 400 GB in size. Predicted translation: apple's cameras on a separate larger repair and range between 30 and and in earth. Actual translation: Promotional trailers arrive on a separate hard drive and range between 200 GB and 400 GB in size. <eos> Continue? [Y/n] Input sentence: Kincaid is best known for his convergence model of communication, a nonlinear model of communication wherein two communicators strive to reach "mutual understanding." Predicted translation: although is significant for his information model of communication a high model of communication Actual translation: Kincaid is best known for his convergence model of communication, a nonlinear model of communication wherein two communicators strive to reach "mutual understanding." <eos> Continue? [Y/n] Input sentence: Subscriptions to the overall offering hosted on ScienceDirect, rather than to specific titles it carries, are usually acquired through a so called big deal. Predicted translation: subscribers to the gain for cnn than rather than to specific while it called are usually through a so called Actual translation: Subscriptions to the overall offering hosted on ScienceDirect, rather than to specific titles it carries, are usually acquired through a so called big deal. <eos> Continue? [Y/n] Input sentence: One additional approach which is not initiated by operators is the usage of over-the-top content (OTT) services, using applications like Skype and Google Talk to provide LTE voice service. Predicted translation: one additional approach which is not initiated by operators is the availability of over the 2g content services, like and google talk to provide lte voice service. Actual translation: One additional approach which is not initiated by operators is the usage of over-the-top content (OTT) services, using applications like Skype and Google Talk to provide LTE voice service. <eos> Continue? [Y/n] Input sentence: Europe had a total population of about 741 million (about 11% of the world population) as of 2018. Predicted translation: europe had a total population of about million about and the population and in 2018. Actual translation: Europe had a total population of about 741 million (about 11% of the world population) as of 2018. <eos> Continue? [Y/n] Input sentence: The gain of each channel is made proportional to the rms signal level and inversely proportional to the mean square noise level in that channel. Predicted translation: the gain of each channel is made proportional to the earth signal and inversely proportional to the person square noise in the networks. Actual translation: The gain of each channel is made proportional to the rms signal level and inversely proportional to the mean square noise level in that channel. <eos> Continue? [Y/n] Input sentence: In 2009, Obama signed into law the National Defense Authorization Act for Fiscal Year 2010, which contained in it the Matthew Shepard and Predicted translation: in 2009, 2017, after cnn and the national intelligence proposal for order was the latter will the and Actual translation: In 2009, Obama signed into law the National Defense Authorization Act for Fiscal Year 2010, which contained in it the Matthew Shepard and <eos> Continue? [Y/n] Input sentence: On 16 March 2011, the freighter MS Oliva ran aground on Nightingale Island, spilling tons of heavy fuel oil into the ocean. Predicted translation: on 16 march 2011, the 1 george before 30 of heavy and the ocean into the ocean Actual translation: On 16 March 2011, the freighter MS Oliva ran aground on Nightingale Island, spilling tons of heavy fuel oil into the ocean. <eos> Continue? [Y/n] Input sentence: Since UDH is part of the payload, the number of available characters per segment is lower: 153 for 7-bit encoding, 134 for 8-bit encoding and 67 for 16-bit encoding. Predicted translation: since is part of the oscillating of the web rate is using for using high bits and and higher Actual translation: Since UDH is part of the payload, the number of available characters per segment is lower: 153 for 7-bit encoding, 134 for 8-bit encoding and 67 for 16-bit encoding. <eos> Continue? [Y/n] Input sentence: In Zone 1, things are much different. Predicted translation: in the processes are much other. Actual translation: In Zone 1, things are much different. <eos> Continue? [Y/n] Input sentence: Such a handover, in which the source and the target are different cells (even if they are on the same cell site) is called inter-cell handover. Predicted translation: such a key in which the source and the target are different cells even if they are on the same cell site is called digital Actual translation: Such a handover, in which the source and the target are different cells (even if they are on the same cell site) is called inter-cell handover. <eos> Continue? [Y/n] Input sentence: Single-chip processors increase reliability because there are many fewer electrical connections that could fail. Predicted translation: single chip devices, offer generation level because many other and the user or that Actual translation: Single-chip processors increase reliability because there are many fewer electrical connections that could fail. <eos> ``` ## experiment (brak modelu) ![](https://i.imgur.com/oSOVpPT.png) ``` =python for i in range(EPOCHS): for batch in BATCHES_OF_DATA: policz_model(epochs=1) ``` ![](https://i.imgur.com/6nNxHgR.png) skopałam zapisywanie danych i to tylko ostatnie 5k ze 100k i ostatnia epoka, ale reszta też tak falowała koło 0.9 ``` Input sentence: The DCT is the coding standard for multimedia communications devices. Predicted translation: the dct is the coding standard for multimedia communications devices. === Actual translation: The DCT is the coding standard for multimedia communications devices. <eos> Continue? [Y/n] Input sentence: A statement by the Prime Minister summarized the situation on 8 September. Predicted translation: a statement by the prime minister summarized the situation on 8 september. Actual translation: A statement by the Prime Minister summarized the situation on 8 September. <eos> Continue? [Y/n] Input sentence: Thus, they are often gold plated. Predicted translation: thus, they are often gold Actual translation: Thus, they are often gold plated. <eos> Continue? [Y/n] Input sentence: Postman was born in New York City, where he would spend most of his life. Predicted translation: postman was born in new york city, where he would spend most of his life. === Actual translation: Postman was born in New York City, where he would spend most of his life. <eos> Continue? [Y/n] Input sentence: Yet, the paradigm's inherent influence perspective and other central questions of the debate keep re-emerging under different headings and more advanced concepts such as hybridization and glocalisation. == Predicted translation: yet, the inherent influence perspective and other central questions of the debate keep under different and more advanced concepts such as and Actual translation: Yet, the paradigm's inherent influence perspective and other central questions of the debate keep re-emerging under different headings and more advanced concepts such as hybridization and glocalisation. == <eos> Continue? [Y/n] Input sentence: However, McLuhan's comments are more aware of the contingent cultural context in which for instance linear perspective arose, while Panofsky's ones are more teleological. Predicted translation: however, mcluhan's comments are more aware of the cultural context in which for instance, linear perspective while ones are more Actual translation: However, McLuhan's comments are more aware of the contingent cultural context in which for instance linear perspective arose, while Panofsky's ones are more teleological. <eos> Continue? [Y/n] Input sentence: During 1790–1795, at the height of the French Revolution, France needed a swift and reliable military communications system to thwart the war efforts of its enemies. Predicted translation: during at the height of the french revolution france needed a swift and reliable military communications system to thwart the war efforts of its enemies. Actual translation: During 1790–1795, at the height of the French Revolution, France needed a swift and reliable military communications system to thwart the war efforts of its enemies. <eos> Continue? [Y/n] Input sentence: The early Swedish system was more flexible, having the ability to set up message connections between arbitrary stations. Predicted translation: the early swedish system was more flexible, having the ability to set up message between arbitrary stations. === Actual translation: The early Swedish system was more flexible, having the ability to set up message connections between arbitrary stations. <eos> Continue? [Y/n] Input sentence: He spent the time waiting for a new voyage inventing his mirror galvanometer. Predicted translation: he spent the time waiting for a new voyage inventing his mirror. Actual translation: He spent the time waiting for a new voyage inventing his mirror galvanometer. <eos> Continue? [Y/n] Input sentence: John Lennon and Yoko Ono summered in Mill Valley in the early 1970s, having left some of his own graffiti on the wall of the residence Predicted translation: john and in mill valley in the early 1970s, having left some of his own on the wall of the Actual translation: John Lennon and Yoko Ono summered in Mill Valley in the early 1970s, having left some of his own graffiti on the wall of the residence <eos> Continue? [Y/n] Input sentence: It has been possible to carry out Denial-of-service attacks in a P2P lab environment, where users running BitTorrent clients act as amplifiers for an attack at another service. Predicted translation: it has been possible to carry out denial of service attacks in a iot lab where users running bittorrent clients act as amplifiers for an attack at another service. Actual translation: It has been possible to carry out Denial-of-service attacks in a P2P lab environment, where users running BitTorrent clients act as amplifiers for an attack at another service. <eos> Continue? [Y/n] Input sentence: Related documents were shown using citation and word based measures and an active and continuously updated bibliography is shown for each document. Predicted translation: related documents were shown using citation and word based measures and an active and continuously updated bibliography is shown for each Actual translation: Related documents were shown using citation and word based measures and an active and continuously updated bibliography is shown for each document. <eos> ``` ## wikispoiledstruct model BATCH_SIZE = 10 EPOCHS = 25 LATENT_DIM = 117 LATENT_DIM_DECODER = 63 # idea: make it different to ensure things all fit together properly! NUM_SAMPLES = 100000 NUM_PARTS = 20 #number of batches to divide samples to MAX_SEQUENCE_LENGTH = 100 MAX_NUM_WORDS = 20000 EMBEDDING_DIM = 100 poprawione rysowanie wykresu (wartości loss, acc itp uśrednione z całego datasetu dla każdej epoki oddzielnie) wywaliło się ![](https://i.imgur.com/wWCVVsp.png) ## wikibooks dictionary pierwszy "lepsiejszy" niż poprzednie (wikibooksidict) ![](https://i.imgur.com/FVDqW0a.png) BATCH_SIZE = 30 EPOCHS = 15 LATENT_DIM = 168 #encoder data shape LATENT_DIM_DECODER = 148 # decoder data shape NUM_SAMPLES = 90000 NUM_PARTS = 40 #number of batches to divide samples to MAX_SEQUENCE_LENGTH = 100 MAX_NUM_WORDS = 20000 EMBEDDING_DIM = 100 zdanka trzeba przetestować na serwisie bo komórka się nie odpala po tym jak model się kończy liczyć ## wikibooks struct