Jovian
⭐️
Sign In
In [1]:
%reload_ext autoreload
%autoreload 2
%matplotlib inline
In [2]:
from fastai.text import *

Download the dataset

Sample Data

In [70]:
path=untar_data(URLs.IMDB_SAMPLE);path.ls()
Out[70]:
[PosixPath('/home/ubuntu/.fastai/data/imdb_sample/data_lm.pkl'),
 PosixPath('/home/ubuntu/.fastai/data/imdb_sample/tmp'),
 PosixPath('/home/ubuntu/.fastai/data/imdb_sample/data_save.pkl'),
 PosixPath('/home/ubuntu/.fastai/data/imdb_sample/texts.csv'),
 PosixPath('/home/ubuntu/.fastai/data/imdb_sample/models')]
In [11]:
df=pd.read_csv(path/'texts.csv');df.head()
Out[11]:

Create a TextDataBunch

In [43]:
data_lm = TextLMDataBunch.from_csv(path, 'texts.csv')

Language Model

In [30]:
bs=48
In [19]:
#path = untar_data(URLs.IMDB)
In [31]:
#data_lm = (TextList.from_folder(path) #all text files in path
#    .filter_by_folder(include=['train', 'test', 'unsup'])
#    .split_by_rand_pct(0.1)
#    .label_for_lm()
    #.databunch(bs=bs))
In [32]:
#data_lm.save('data_lm.pkl')
In [35]:
#data_lm = load_data(path, 'data_lm.pkl')
In [37]:
#data_lm.show_batch()
In [51]:
learn=language_model_learner(data_lm, AWD_LSTM, drop_mult=0.3)
In [52]:
learn.lr_find()
LR Finder is complete, type {learner_name}.recorder.plot() to see the graph.
In [53]:
learn.recorder.plot()
Notebook Image
In [54]:
learn.fit_one_cycle(1, 1e-2, moms=(0.8, 0.7))
In [56]:
learn.save('fit_head')
In [57]:
learn.load('fit_head')
Out[57]:
LanguageLearner(data=TextLMDataBunch;

Train: LabelList (799 items)
x: LMTextList
xxbos xxmaj well , it is hard to add comment after reading what is already here but i feel i must say something . i was n't exactly looking for ' a xxunk ' as someone puts it or even ' blood and guts / gore ' . i have some respect for the victims xxunk although i really felt the xxunk xxup xxunk xxunk were xxunk , faceless and meaningless . xxmaj just a xxunk for xxmaj xxunk sexual antics . 
 
  i watched this film with the kind of morbid curiosity that makes me think ' xxmaj what makes a guy be a serial killer ? ' as well as wondering the specifics about the xxmaj dahmer story , of which i know very little . xxmaj people here seem to think that the movie did n't have to cover the events of the xxmaj dahmer story .. xxup i.e. his history , what happened when he got caught , the aftermath , etc but xxup it xxup is xxup important ! xxmaj you see , i assume if you are xxmaj american you xxup will xxup know all of this . xxmaj we do not all live in xxmaj america . xxmaj to tell this story about such a man as he obviously was , xxup requires that at least xxup some of the history and actual events are told / shown . xxmaj this does n't mean blood and guts , there are ways of showing horrific things in a movie by implication or clever filming without resorting to gore . xxmaj without even touching upon some of what he did ( i found out more about him reading the user comments on this site ! ) , the movie felt like a void . a moment in time with very little substance . i would like to know if there is a film about the xxup real xxmaj dahmer because with its lack of direction , xxup very slow pace that xxup never changes , xxmaj strange portrayal of xxunk and the xxup very unfortunate lack of xxup any attempt at an ending , this movie is xxup poor . i would not recommend to anyone that they waste the time it takes to watch it . a definite 1 out of 10 ( for the acting ! ),xxbos i got all excited when i saw the ads for this movie because i recently read the book and really enjoyed it . xxmaj the movie , however , did not meet my expectations . xxmaj having read the book recently prepared me for big let down as often happens when stories are translated into movies . xxmaj the characters did n't seem to fit very well with the book . xxmaj the direction was weak . i had a hard time getting into the characters . xxmaj there was n't a real connection with the viewer about what was going on . xxmaj the dialog did n't explain adequately what was happening . xxmaj it just seemed xxunk together and rushed through . xxmaj all in all i was very disappointed with the movie . i suppose if you have n't read the book , it might be ok by itself . xxmaj at the very least , it might entice you to read the book , which you 'll probably enjoy more . 
 
 ,xxbos xxmaj ask yourself where she got the gun ? xxmaj remember what she was taught about the mark 's xxunk when the con is over ? xxmaj the gun had blanks and it was provided to her from the very beginning . 
 
  xxmaj when the patient comes back at the end she was xxup supposed to see him drive away in the red convertible and lead her to the gang splitting up her 80 thousand . 
 
  xxmaj the patient was in on the con from the beginning . 
 
  xxmaj mantegna does not die in the end - the gun had blanks . 
 
  xxmaj there - enough spoilers for you there ? xxmaj this is why people are giving it such high ratings . xxmaj it 's extremely original because of the hidden ending and how it cons xxup most of the audience .,xxbos i 've watched it plenty of times and i 'm planning on buying the full feature . i love all of xxmaj jason xxmaj xxunk 's comedy . xxmaj it 's very different and unique and is very enjoyable . i love indie films and this one is just great . xxmaj the plot is strange but very funny . xxmaj this short film is about a talking xxmaj spatula named xxmaj edward . xxmaj the order of the events are a bit xxunk , making this film very interesting to watch . xxmaj at first you see xxmaj edward fighting the spoons , but then the focus changes to earlier in his life . xxmaj this is a silly movie , but of course , it 's still great . i highly recommend that you watch this film at xxunk or xxunk . xxmaj it 's very funny . xxmaj the humour may not match everybody 's taste but watch anyway . xxmaj it 'll only take 16 minutes of your time , and it 's free . xxup go xxup watch xxup spatula xxup madness !,xxbos xxmaj please , be warned : this movie , though a pretty bad storyline , was one of the most gruesome movies i have seen ... xxup ever . xxmaj just remember that before you settle on your sofa to enjoy the movie . 
 
  xxmaj so , it officially begins with a party . xxmaj just your average party but there 's some guy there . xxmaj he 's pretty into xxmaj kate ... if you know what i 'm saying . xxmaj xxunk his face ; it 'll help later . 
 
  xxmaj so anyway xxmaj kate goes of to find xxmaj george xxmaj clooney ( did n't i say the plot was bad ? ) and so takes the tube . xxmaj that 's xxmaj london underground at the middle of the night , but she 's just stupid like that . xxmaj so the xxunk says the next , and last , train will come in 7 minutes . xxmaj now xxmaj kate , dumb party girl that she is , decides that she can have a nap in the spare 7 minutes . xxmaj typically , she misses the train and finds herself locked in the xxmaj london xxmaj underground . xxmaj alone . xxmaj well , almost ... 
 
  xxmaj so the movie just carries on from there . xxmaj blood , guts , limbs , even certain parts of the body i shall not mention are xxunk and xxunk and eventually xxunk from the body . 
 
  xxmaj in short , it 's a typical horror ; pretty but thick damsel in distress - type women and sick , weird psycho . xxmaj or as the case may have it , xxmaj creep . 
 
  i 'd say give it a go if you 're into xxmaj saw , xxmaj hostel or the xxmaj texas xxmaj chainsaw xxmaj massacre but for the rest of us , xxmaj scream with satisfy out horror needs xxunk very much .
y: LMLabelList
,,,,
Path: /home/ubuntu/.fastai/data/imdb_sample;

Valid: LabelList (201 items)
x: LMTextList
xxbos xxmaj based on xxmaj tom xxmaj xxunk 's satirical novel that was xxunk by all ( i have not read it yet ) xxmaj tom xxmaj hanks stars as a wall xxunk who accidentally kills a black boy while lost in a bad part of xxup nyc xxmaj willis stars as the reporter who starts xxmaj hanks on his xxunk xxunk .. xxmaj the characters are very thin and there seems to be no xxunk for anyone in this movie and for a comedy or a satire there are nt a lot of laughs either .. xxmaj xxunk xxmaj griffith had her breasts done during filming so a fun thing to do is to see if her xxunk change size during different parts of the film .. xxmaj this will keep your mind off other things like the lack of script or humor .. xxmaj on a scale of one to ten .. 3,xxbos xxmaj nicholas xxmaj xxunk is xxmaj paul , the local town xxmaj xxunk who 's married to xxmaj xxunk ( xxmaj ally xxmaj xxunk ) , but also is a xxunk xxunk and decides to fake his own death to run away with his current affair , xxmaj xxunk ( xxmaj xxunk xxmaj xxunk ) . xxmaj however in so doing , he gets a xxunk of xxunk ( hence the name of the film ) . xxmaj sally xxmaj xxunk is also on hand as a crazy old xxunk who xxunk for the good xxmaj xxunk in a shades of " xxmaj misery " type of way . xxmaj it 's sad to see a pretty good cast wasted like this . xxmaj not the least bit xxmaj john xxmaj savage in a xxunk forgettable role as a shoddy private xxunk . xxmaj in a film billed as a ' black comedy ' , one has to bring xxup both elements into said movie . xxmaj while this does bring the former in spades , it sadly contains none of the latter . xxmaj furthermore you ca n't xxunk with any of the characters and as thus , have absolutely no xxunk interest in them . xxmaj technically not an all - together bad movie just an extremely forgettable one . 
 
  xxmaj eye xxmaj candy : xxmaj xxunk xxmaj xxunk gets topless ; xxmaj sally xxmaj xxunk also shows some skin 
 
  xxmaj my xxmaj grade : xxup c- 
 
  xxmaj where i saw it : xxmaj xxunk xxmaj showcase,xxbos xxmaj harvey xxmaj xxunk 's best performance so far the new century . xxmaj very nicely photographed , a beautiful xxunk - shot of pre - xxmaj xxunk xxmaj cuba . xxmaj the story revolves around the nephew of a local minor crime boss who develops a friendship with an xxmaj american with xxmaj hollywood connections . xxmaj it 's really about the moment when a boy xxunk to the fact that the small circle of people he knows actually live in a much larger , much more complex world that he does n't yet xxunk script is strong and filled with humor , the direction is crisp . xxmaj over all , a really professional job that fits in well with the tradition of xxmaj xxunk xxmaj american cinema . xxmaj the one weakness is the decision to shoot in sync - sound xxmaj english rather than xxmaj spanish - probably to improve xxunk in the xxup us . xxmaj unfortunately , this just makes the film a little less convincing . xxmaj but if you can see beyond this , you will find a heartfelt trip to another world . xxmaj recommended .,xxbos xxmaj one xxunk for the greatness of a movie is , ' if it came on xxunk . right now , would you want to sit there and watch it again ? ' xxmaj my answer for the xxmaj grand xxmaj xxunk is as powerful a " yes " as it would be for nearly any movie i have ever seen . xxmaj there are just so many powerful moments , such an intelligent and moving story , such incredible performances . 
 
  xxmaj it perfectly captures the confusion and violence that were so rampant in the early nineties . xxmaj but it also dramatically xxunk the capacity of individuals to love , think and care . xxmaj in a slight way , the movie was of its time . xxmaj it xxunk portrays society as a xxunk about to burst . xxmaj because the country was in a xxunk , and so void of xxunk , this was true of that time . xxmaj but the movie is also timeless . i think it could honestly stand up against any movie that has ever been made , and it is the most xxunk film of all time .,xxbos xxup warning ! xxmaj this review will reveal the ending of the movie , " xxmaj xxunk . " xxmaj if you do n't want to know how the movie ends , do n't read this review ! 
 
  " xxmaj xxunk " is so bad you 'll think " xxmaj xxunk xxmaj hall " was a xxunk . 
 
  xxmaj it gets one star because you get to see xxmaj hugh xxmaj xxunk 's naked chest . xxmaj that 's the only thing " xxmaj xxunk " has going for it . 
 
  xxmaj woody xxmaj allen 's xxunk , and his xxunk on women young enough , at this point , to be his xxunk , has crippled any ability to make movies he may have had at any point . 
 
  xxmaj the plot seems promising : a ghost , xxmaj ian xxunk , directs a xxunk headed student , xxmaj xxunk xxmaj xxunk , to investigate whether or not an xxmaj english xxmaj lord , xxmaj hugh xxmaj xxunk , is the xxunk xxmaj xxunk xxmaj card xxmaj killer of prostitutes . a xxunk , xxmaj woody xxmaj allen , helps the girl . 
 
  xxmaj promising plot xxunk , the movie completely lacks charm , or humor , or atmosphere . xxmaj it 's an amazingly xxunk , amateurish effort for someone who has made even one previous film , never mind dozens . xxmaj perhaps xxmaj allen has had a xxunk that has gone xxunk in the press . 
 
  xxmaj much is made of the fact that unlike in his previous films , xxmaj woody xxmaj allen , now a xxunk , has xxup finally allowed a younger male lead to get the girl . 
 
  xxmaj not so . xxmaj in fact , the plot is constructed in such a way so that the girl gets no one . 
 
  xxmaj there is an early scene where xxmaj xxunk , for no reason central to the movie , allows herself to be gotten drunk , and seduced , by a powerful , older director . " xxmaj seduced " is a xxunk for what happens . xxmaj it 's a " xxunk , bam , i 've got ta go " kind of moment . xxmaj it bears no relation to the plot whatsoever , and it xxunk xxmaj xxunk in the viewer 's eye . xxmaj why did xxmaj allen add that unnecessary scene to the movie ? xxmaj because it shows a powerful director - like xxmaj allen - having sex with the female lead . xxmaj allen gets to have his cake and eat it , too . 
 
  xxmaj xxunk is not yet an actress . xxmaj she does n't know how to xxunk the screen except by wearing a tight , low cut top . xxmaj she xxunk xxmaj allen in a couple of scenes , and that just looks weird and sad . 
 
  xxmaj it does n't help that her character is scripted as a doll who ca n't function without a ghost , or an elderly and less than awe - inspiring xxunk , telling her what to do at every turn . 
 
  xxmaj she is xxunk half xxmaj xxunk 's age , and she comes across as a very xxunk screen presence in their scenes together . 
 
  xxmaj audience members not obsessed with breasts deserve better in their xxunk , and xxmaj xxunk deserves better , too -- a script that gives the heroine some intelligence and xxunk , and an actress who can convey those qualities . 
 
  xxmaj hugh xxmaj xxunk is similarly cheated by the script . xxmaj allen apparently ca n't stand it that xxmaj xxunk is so xxunk good looking and young , and so he gives xxmaj xxunk nothing to say or do . xxmaj like xxmaj xxunk , he is used merely for his good looks . xxmaj this is a shame , because , as xxmaj xxunk has shown in any number of productions , from " xxmaj oklahoma " to " x xxmaj men , " he xxup can act . 
 
  xxmaj here 's the big plot twist -- xxmaj xxunk , suave , charming xxmaj english xxmaj lord , really is a killer . xxmaj so , though the movie says it is all about letting someone else , other than xxmaj allen , get the girl , she does n't get anyone . xxmaj xxunk , the man she 's been making love to , is a man who murdered a prostitute . xxmaj nice , xxmaj woody . xxmaj nice way to xxunk your heroine for being beyond your grasp . 
 
  xxmaj in a xxunk aggressive touch , xxmaj allen xxunk his heroine of his own presence , as well , killing off his character , the xxunk , leaving xxmaj xxunk xxmaj xxunk all alone at the end of the film . 
 
  a final note : at my screening , not a single audience member laughed at any point during the film . xxmaj always a bad sign when a film is advertised as a comedy .
y: LMLabelList
,,,,
Path: /home/ubuntu/.fastai/data/imdb_sample;

Test: None, model=SequentialRNN(
  (0): AWD_LSTM(
    (encoder): Embedding(8760, 400, padding_idx=1)
    (encoder_dp): EmbeddingDropout(
      (emb): Embedding(8760, 400, padding_idx=1)
    )
    (rnns): ModuleList(
      (0): WeightDropout(
        (module): LSTM(400, 1152, batch_first=True)
      )
      (1): WeightDropout(
        (module): LSTM(1152, 1152, batch_first=True)
      )
      (2): WeightDropout(
        (module): LSTM(1152, 400, batch_first=True)
      )
    )
    (input_dp): RNNDropout()
    (hidden_dps): ModuleList(
      (0): RNNDropout()
      (1): RNNDropout()
      (2): RNNDropout()
    )
  )
  (1): LinearDecoder(
    (decoder): Linear(in_features=400, out_features=8760, bias=True)
    (output_dp): RNNDropout()
  )
), opt_func=functools.partial(<class 'torch.optim.adam.Adam'>, betas=(0.9, 0.99)), loss_func=FlattenedLoss of CrossEntropyLoss(), metrics=[<function accuracy at 0x7fee0f496a60>], true_wd=True, bn_wd=True, wd=0.01, train_bn=True, path=PosixPath('/home/ubuntu/.fastai/data/imdb_sample'), model_dir='models', callback_fns=[functools.partial(<class 'fastai.basic_train.Recorder'>, add_time=True, silent=False)], callbacks=[RNNTrainer
learn: LanguageLearner(data=TextLMDataBunch;

Train: LabelList (799 items)
x: LMTextList
xxbos xxmaj well , it is hard to add comment after reading what is already here but i feel i must say something . i was n't exactly looking for ' a xxunk ' as someone puts it or even ' blood and guts / gore ' . i have some respect for the victims xxunk although i really felt the xxunk xxup xxunk xxunk were xxunk , faceless and meaningless . xxmaj just a xxunk for xxmaj xxunk sexual antics . 
 
  i watched this film with the kind of morbid curiosity that makes me think ' xxmaj what makes a guy be a serial killer ? ' as well as wondering the specifics about the xxmaj dahmer story , of which i know very little . xxmaj people here seem to think that the movie did n't have to cover the events of the xxmaj dahmer story .. xxup i.e. his history , what happened when he got caught , the aftermath , etc but xxup it xxup is xxup important ! xxmaj you see , i assume if you are xxmaj american you xxup will xxup know all of this . xxmaj we do not all live in xxmaj america . xxmaj to tell this story about such a man as he obviously was , xxup requires that at least xxup some of the history and actual events are told / shown . xxmaj this does n't mean blood and guts , there are ways of showing horrific things in a movie by implication or clever filming without resorting to gore . xxmaj without even touching upon some of what he did ( i found out more about him reading the user comments on this site ! ) , the movie felt like a void . a moment in time with very little substance . i would like to know if there is a film about the xxup real xxmaj dahmer because with its lack of direction , xxup very slow pace that xxup never changes , xxmaj strange portrayal of xxunk and the xxup very unfortunate lack of xxup any attempt at an ending , this movie is xxup poor . i would not recommend to anyone that they waste the time it takes to watch it . a definite 1 out of 10 ( for the acting ! ),xxbos i got all excited when i saw the ads for this movie because i recently read the book and really enjoyed it . xxmaj the movie , however , did not meet my expectations . xxmaj having read the book recently prepared me for big let down as often happens when stories are translated into movies . xxmaj the characters did n't seem to fit very well with the book . xxmaj the direction was weak . i had a hard time getting into the characters . xxmaj there was n't a real connection with the viewer about what was going on . xxmaj the dialog did n't explain adequately what was happening . xxmaj it just seemed xxunk together and rushed through . xxmaj all in all i was very disappointed with the movie . i suppose if you have n't read the book , it might be ok by itself . xxmaj at the very least , it might entice you to read the book , which you 'll probably enjoy more . 
 
 ,xxbos xxmaj ask yourself where she got the gun ? xxmaj remember what she was taught about the mark 's xxunk when the con is over ? xxmaj the gun had blanks and it was provided to her from the very beginning . 
 
  xxmaj when the patient comes back at the end she was xxup supposed to see him drive away in the red convertible and lead her to the gang splitting up her 80 thousand . 
 
  xxmaj the patient was in on the con from the beginning . 
 
  xxmaj mantegna does not die in the end - the gun had blanks . 
 
  xxmaj there - enough spoilers for you there ? xxmaj this is why people are giving it such high ratings . xxmaj it 's extremely original because of the hidden ending and how it cons xxup most of the audience .,xxbos i 've watched it plenty of times and i 'm planning on buying the full feature . i love all of xxmaj jason xxmaj xxunk 's comedy . xxmaj it 's very different and unique and is very enjoyable . i love indie films and this one is just great . xxmaj the plot is strange but very funny . xxmaj this short film is about a talking xxmaj spatula named xxmaj edward . xxmaj the order of the events are a bit xxunk , making this film very interesting to watch . xxmaj at first you see xxmaj edward fighting the spoons , but then the focus changes to earlier in his life . xxmaj this is a silly movie , but of course , it 's still great . i highly recommend that you watch this film at xxunk or xxunk . xxmaj it 's very funny . xxmaj the humour may not match everybody 's taste but watch anyway . xxmaj it 'll only take 16 minutes of your time , and it 's free . xxup go xxup watch xxup spatula xxup madness !,xxbos xxmaj please , be warned : this movie , though a pretty bad storyline , was one of the most gruesome movies i have seen ... xxup ever . xxmaj just remember that before you settle on your sofa to enjoy the movie . 
 
  xxmaj so , it officially begins with a party . xxmaj just your average party but there 's some guy there . xxmaj he 's pretty into xxmaj kate ... if you know what i 'm saying . xxmaj xxunk his face ; it 'll help later . 
 
  xxmaj so anyway xxmaj kate goes of to find xxmaj george xxmaj clooney ( did n't i say the plot was bad ? ) and so takes the tube . xxmaj that 's xxmaj london underground at the middle of the night , but she 's just stupid like that . xxmaj so the xxunk says the next , and last , train will come in 7 minutes . xxmaj now xxmaj kate , dumb party girl that she is , decides that she can have a nap in the spare 7 minutes . xxmaj typically , she misses the train and finds herself locked in the xxmaj london xxmaj underground . xxmaj alone . xxmaj well , almost ... 
 
  xxmaj so the movie just carries on from there . xxmaj blood , guts , limbs , even certain parts of the body i shall not mention are xxunk and xxunk and eventually xxunk from the body . 
 
  xxmaj in short , it 's a typical horror ; pretty but thick damsel in distress - type women and sick , weird psycho . xxmaj or as the case may have it , xxmaj creep . 
 
  i 'd say give it a go if you 're into xxmaj saw , xxmaj hostel or the xxmaj texas xxmaj chainsaw xxmaj massacre but for the rest of us , xxmaj scream with satisfy out horror needs xxunk very much .
y: LMLabelList
,,,,
Path: /home/ubuntu/.fastai/data/imdb_sample;

Valid: LabelList (201 items)
x: LMTextList
xxbos xxmaj based on xxmaj tom xxmaj xxunk 's satirical novel that was xxunk by all ( i have not read it yet ) xxmaj tom xxmaj hanks stars as a wall xxunk who accidentally kills a black boy while lost in a bad part of xxup nyc xxmaj willis stars as the reporter who starts xxmaj hanks on his xxunk xxunk .. xxmaj the characters are very thin and there seems to be no xxunk for anyone in this movie and for a comedy or a satire there are nt a lot of laughs either .. xxmaj xxunk xxmaj griffith had her breasts done during filming so a fun thing to do is to see if her xxunk change size during different parts of the film .. xxmaj this will keep your mind off other things like the lack of script or humor .. xxmaj on a scale of one to ten .. 3,xxbos xxmaj nicholas xxmaj xxunk is xxmaj paul , the local town xxmaj xxunk who 's married to xxmaj xxunk ( xxmaj ally xxmaj xxunk ) , but also is a xxunk xxunk and decides to fake his own death to run away with his current affair , xxmaj xxunk ( xxmaj xxunk xxmaj xxunk ) . xxmaj however in so doing , he gets a xxunk of xxunk ( hence the name of the film ) . xxmaj sally xxmaj xxunk is also on hand as a crazy old xxunk who xxunk for the good xxmaj xxunk in a shades of " xxmaj misery " type of way . xxmaj it 's sad to see a pretty good cast wasted like this . xxmaj not the least bit xxmaj john xxmaj savage in a xxunk forgettable role as a shoddy private xxunk . xxmaj in a film billed as a ' black comedy ' , one has to bring xxup both elements into said movie . xxmaj while this does bring the former in spades , it sadly contains none of the latter . xxmaj furthermore you ca n't xxunk with any of the characters and as thus , have absolutely no xxunk interest in them . xxmaj technically not an all - together bad movie just an extremely forgettable one . 
 
  xxmaj eye xxmaj candy : xxmaj xxunk xxmaj xxunk gets topless ; xxmaj sally xxmaj xxunk also shows some skin 
 
  xxmaj my xxmaj grade : xxup c- 
 
  xxmaj where i saw it : xxmaj xxunk xxmaj showcase,xxbos xxmaj harvey xxmaj xxunk 's best performance so far the new century . xxmaj very nicely photographed , a beautiful xxunk - shot of pre - xxmaj xxunk xxmaj cuba . xxmaj the story revolves around the nephew of a local minor crime boss who develops a friendship with an xxmaj american with xxmaj hollywood connections . xxmaj it 's really about the moment when a boy xxunk to the fact that the small circle of people he knows actually live in a much larger , much more complex world that he does n't yet xxunk script is strong and filled with humor , the direction is crisp . xxmaj over all , a really professional job that fits in well with the tradition of xxmaj xxunk xxmaj american cinema . xxmaj the one weakness is the decision to shoot in sync - sound xxmaj english rather than xxmaj spanish - probably to improve xxunk in the xxup us . xxmaj unfortunately , this just makes the film a little less convincing . xxmaj but if you can see beyond this , you will find a heartfelt trip to another world . xxmaj recommended .,xxbos xxmaj one xxunk for the greatness of a movie is , ' if it came on xxunk . right now , would you want to sit there and watch it again ? ' xxmaj my answer for the xxmaj grand xxmaj xxunk is as powerful a " yes " as it would be for nearly any movie i have ever seen . xxmaj there are just so many powerful moments , such an intelligent and moving story , such incredible performances . 
 
  xxmaj it perfectly captures the confusion and violence that were so rampant in the early nineties . xxmaj but it also dramatically xxunk the capacity of individuals to love , think and care . xxmaj in a slight way , the movie was of its time . xxmaj it xxunk portrays society as a xxunk about to burst . xxmaj because the country was in a xxunk , and so void of xxunk , this was true of that time . xxmaj but the movie is also timeless . i think it could honestly stand up against any movie that has ever been made , and it is the most xxunk film of all time .,xxbos xxup warning ! xxmaj this review will reveal the ending of the movie , " xxmaj xxunk . " xxmaj if you do n't want to know how the movie ends , do n't read this review ! 
 
  " xxmaj xxunk " is so bad you 'll think " xxmaj xxunk xxmaj hall " was a xxunk . 
 
  xxmaj it gets one star because you get to see xxmaj hugh xxmaj xxunk 's naked chest . xxmaj that 's the only thing " xxmaj xxunk " has going for it . 
 
  xxmaj woody xxmaj allen 's xxunk , and his xxunk on women young enough , at this point , to be his xxunk , has crippled any ability to make movies he may have had at any point . 
 
  xxmaj the plot seems promising : a ghost , xxmaj ian xxunk , directs a xxunk headed student , xxmaj xxunk xxmaj xxunk , to investigate whether or not an xxmaj english xxmaj lord , xxmaj hugh xxmaj xxunk , is the xxunk xxmaj xxunk xxmaj card xxmaj killer of prostitutes . a xxunk , xxmaj woody xxmaj allen , helps the girl . 
 
  xxmaj promising plot xxunk , the movie completely lacks charm , or humor , or atmosphere . xxmaj it 's an amazingly xxunk , amateurish effort for someone who has made even one previous film , never mind dozens . xxmaj perhaps xxmaj allen has had a xxunk that has gone xxunk in the press . 
 
  xxmaj much is made of the fact that unlike in his previous films , xxmaj woody xxmaj allen , now a xxunk , has xxup finally allowed a younger male lead to get the girl . 
 
  xxmaj not so . xxmaj in fact , the plot is constructed in such a way so that the girl gets no one . 
 
  xxmaj there is an early scene where xxmaj xxunk , for no reason central to the movie , allows herself to be gotten drunk , and seduced , by a powerful , older director . " xxmaj seduced " is a xxunk for what happens . xxmaj it 's a " xxunk , bam , i 've got ta go " kind of moment . xxmaj it bears no relation to the plot whatsoever , and it xxunk xxmaj xxunk in the viewer 's eye . xxmaj why did xxmaj allen add that unnecessary scene to the movie ? xxmaj because it shows a powerful director - like xxmaj allen - having sex with the female lead . xxmaj allen gets to have his cake and eat it , too . 
 
  xxmaj xxunk is not yet an actress . xxmaj she does n't know how to xxunk the screen except by wearing a tight , low cut top . xxmaj she xxunk xxmaj allen in a couple of scenes , and that just looks weird and sad . 
 
  xxmaj it does n't help that her character is scripted as a doll who ca n't function without a ghost , or an elderly and less than awe - inspiring xxunk , telling her what to do at every turn . 
 
  xxmaj she is xxunk half xxmaj xxunk 's age , and she comes across as a very xxunk screen presence in their scenes together . 
 
  xxmaj audience members not obsessed with breasts deserve better in their xxunk , and xxmaj xxunk deserves better , too -- a script that gives the heroine some intelligence and xxunk , and an actress who can convey those qualities . 
 
  xxmaj hugh xxmaj xxunk is similarly cheated by the script . xxmaj allen apparently ca n't stand it that xxmaj xxunk is so xxunk good looking and young , and so he gives xxmaj xxunk nothing to say or do . xxmaj like xxmaj xxunk , he is used merely for his good looks . xxmaj this is a shame , because , as xxmaj xxunk has shown in any number of productions , from " xxmaj oklahoma " to " x xxmaj men , " he xxup can act . 
 
  xxmaj here 's the big plot twist -- xxmaj xxunk , suave , charming xxmaj english xxmaj lord , really is a killer . xxmaj so , though the movie says it is all about letting someone else , other than xxmaj allen , get the girl , she does n't get anyone . xxmaj xxunk , the man she 's been making love to , is a man who murdered a prostitute . xxmaj nice , xxmaj woody . xxmaj nice way to xxunk your heroine for being beyond your grasp . 
 
  xxmaj in a xxunk aggressive touch , xxmaj allen xxunk his heroine of his own presence , as well , killing off his character , the xxunk , leaving xxmaj xxunk xxmaj xxunk all alone at the end of the film . 
 
  a final note : at my screening , not a single audience member laughed at any point during the film . xxmaj always a bad sign when a film is advertised as a comedy .
y: LMLabelList
,,,,
Path: /home/ubuntu/.fastai/data/imdb_sample;

Test: None, model=SequentialRNN(
  (0): AWD_LSTM(
    (encoder): Embedding(8760, 400, padding_idx=1)
    (encoder_dp): EmbeddingDropout(
      (emb): Embedding(8760, 400, padding_idx=1)
    )
    (rnns): ModuleList(
      (0): WeightDropout(
        (module): LSTM(400, 1152, batch_first=True)
      )
      (1): WeightDropout(
        (module): LSTM(1152, 1152, batch_first=True)
      )
      (2): WeightDropout(
        (module): LSTM(1152, 400, batch_first=True)
      )
    )
    (input_dp): RNNDropout()
    (hidden_dps): ModuleList(
      (0): RNNDropout()
      (1): RNNDropout()
      (2): RNNDropout()
    )
  )
  (1): LinearDecoder(
    (decoder): Linear(in_features=400, out_features=8760, bias=True)
    (output_dp): RNNDropout()
  )
), opt_func=functools.partial(<class 'torch.optim.adam.Adam'>, betas=(0.9, 0.99)), loss_func=FlattenedLoss of CrossEntropyLoss(), metrics=[<function accuracy at 0x7fee0f496a60>], true_wd=True, bn_wd=True, wd=0.01, train_bn=True, path=PosixPath('/home/ubuntu/.fastai/data/imdb_sample'), model_dir='models', callback_fns=[functools.partial(<class 'fastai.basic_train.Recorder'>, add_time=True, silent=False)], callbacks=[...], layer_groups=[Sequential(
  (0): WeightDropout(
    (module): LSTM(400, 1152, batch_first=True)
  )
  (1): RNNDropout()
), Sequential(
  (0): WeightDropout(
    (module): LSTM(1152, 1152, batch_first=True)
  )
  (1): RNNDropout()
), Sequential(
  (0): WeightDropout(
    (module): LSTM(1152, 400, batch_first=True)
  )
  (1): RNNDropout()
), Sequential(
  (0): Embedding(8760, 400, padding_idx=1)
  (1): EmbeddingDropout(
    (emb): Embedding(8760, 400, padding_idx=1)
  )
  (2): LinearDecoder(
    (decoder): Linear(in_features=400, out_features=8760, bias=True)
    (output_dp): RNNDropout()
  )
)], add_time=True, silent=None)
alpha: 2.0
beta: 1.0], layer_groups=[Sequential(
  (0): WeightDropout(
    (module): LSTM(400, 1152, batch_first=True)
  )
  (1): RNNDropout()
), Sequential(
  (0): WeightDropout(
    (module): LSTM(1152, 1152, batch_first=True)
  )
  (1): RNNDropout()
), Sequential(
  (0): WeightDropout(
    (module): LSTM(1152, 400, batch_first=True)
  )
  (1): RNNDropout()
), Sequential(
  (0): Embedding(8760, 400, padding_idx=1)
  (1): EmbeddingDropout(
    (emb): Embedding(8760, 400, padding_idx=1)
  )
  (2): LinearDecoder(
    (decoder): Linear(in_features=400, out_features=8760, bias=True)
    (output_dp): RNNDropout()
  )
)], add_time=True, silent=None)
In [58]:
learn.unfreeze()
In [59]:
learn.fit_one_cycle(3, 1e-3, moms=(0.8,0.7))
In [60]:
learn.save('fine_tuned')
In [69]:
learn.load('fine_tuned')
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-69-c27e93e2b363> in <module>() ----> 1 learn.load('fine_tuned') ~/anaconda3/lib/python3.6/site-packages/fastai/basic_train.py in load(self, file, device, strict, with_opt, purge, remove_module) 265 elif isinstance(device, int): device = torch.device('cuda', device) 266 source = self.path/self.model_dir/f'{file}.pth' if is_pathlike(file) else file --> 267 state = torch.load(source, map_location=device) 268 if set(state.keys()) == {'model', 'opt'}: 269 model_state = state['model'] ~/anaconda3/lib/python3.6/site-packages/torch/serialization.py in load(f, map_location, pickle_module) 364 (sys.version_info[0] == 3 and isinstance(f, pathlib.Path)): 365 new_fd = True --> 366 f = open(f, 'rb') 367 try: 368 return _load(f, map_location, pickle_module) FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.fastai/data/imdb/models/fine_tuned.pth'
In [62]:
TEXT = "I liked this movie because"
N_WORDS = 40
N_SENTENCES = 2
In [63]:
print('\n'.join(learn.predict(TEXT, N_WORDS, temperature=0.75) for _ in range(N_SENTENCES)))
I liked this movie because it is the best i have ever seen . The acting is very good and the acting is good . i am a good actor and i enjoyed the acting . But i do n't know what other I liked this movie because it was pretty bad at first . i have to say this is because the tone and tone of the movie are almost like it is not . The characters are very bad and the acting may not fit
In [64]:
learn.save_encoder('fine_tuned_enc')

Classification

In [65]:
path = untar_data(URLs.IMDB)
In [66]:
data_clas = (TextList.from_folder(path, vocab=data_lm.vocab)
             .split_by_folder(valid='test')
             .label_from_folder(classes=['pos', 'neg'])
             .databunch(bs=bs))
data_clas.save('data_clas.pkl')
In [68]:
learn = text_classifier_learner(data_clas, AWD_LSTM, drop_mult=0.5)
learn.load_encoder('fine_tuned_enc')
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-68-58fb872cb4e2> in <module>() 1 learn = text_classifier_learner(data_clas, AWD_LSTM, drop_mult=0.5) ----> 2 learn.load_encoder('fine_tuned_enc') ~/anaconda3/lib/python3.6/site-packages/fastai/text/learner.py in load_encoder(self, name, device) 67 if device is None: device = self.data.device 68 if hasattr(encoder, 'module'): encoder = encoder.module ---> 69 encoder.load_state_dict(torch.load(self.path/self.model_dir/f'{name}.pth')) 70 encoder.load_state_dict(torch.load(self.path/self.model_dir/f'{name}.pth', map_location=device)) 71 self.freeze() ~/anaconda3/lib/python3.6/site-packages/torch/serialization.py in load(f, map_location, pickle_module) 364 (sys.version_info[0] == 3 and isinstance(f, pathlib.Path)): 365 new_fd = True --> 366 f = open(f, 'rb') 367 try: 368 return _load(f, map_location, pickle_module) FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.fastai/data/imdb/models/fine_tuned_enc.pth'
In [71]:
import jovian
In [ ]:
jovian.commit()
[jovian] Saving notebook..
In [ ]: