6e31785235d44054f8b449a1a388a6d524ee70df,kraken/ketos.py,,train,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,84
Before Change
if ctx.meta["verbose"] < 3:
click.echo("")
click.echo(u"[{:2.4f}] Accuracy report ({}) {:0.4f} {} {}".format(time.time() - st_time, epoch, (c-e)/c, c, e))
for trial, (input, target) in enumerate(train_loader):
input = input.requires_grad_()
o = nn.nn(input)
// height should be 1 by now
if o.size(2) != 1:
raise KrakenInputException("Expected dimension 3 to be 1, actual {}".format(output.size()))
o = o.squeeze(2)
optim.zero_grad()
loss = nn.criterion(o, target)
loss.backward()
optim.step()
spin("Training")
@cli.command("extract")
@click.pass_context
@click.option("-u", "--normalization",
type=click.Choice(["NFD", "NFKD", "NFC", "NFKC"]), default=None,
After Change
if ctx.meta["verbose"] < 3:
click.echo("")
click.echo(u"[{:2.4f}] Accuracy report ({}) {:0.4f} {} {}".format(time.time() - st_time, epoch, (c-e)/c, c, e))
with click.progressbar(label="epoch {}/{}".format(epoch, epochs) , length=len(train_loader), show_pos=True) as bar:
for trial, (input, target) in enumerate(train_loader):
input = input.requires_grad_()
o = nn.nn(input)
// height should be 1 by now
if o.size(2) != 1:
raise KrakenInputException("Expected dimension 3 to be 1, actual {}".format(output.size()))
o = o.squeeze(2)
optim.zero_grad()
loss = nn.criterion(o, target)
loss.backward()
optim.step()
bar.update(1)
@cli.command("extract")
@click.pass_context
@click.option("-u", "--normalization",
type=click.Choice(["NFD", "NFKD", "NFC", "NFKC"]), default=None,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: mittagessen/kraken
Commit Name: 6e31785235d44054f8b449a1a388a6d524ee70df
Time: 2018-05-21
Author: mittagessen@l.unchti.me
File Name: kraken/ketos.py
Class Name:
Method Name: train
Project Name: mittagessen/kraken
Commit Name: 78f505a6cd78c0072ea1a77afb229f8d6658d17b
Time: 2018-05-23
Author: mittagessen@l.unchti.me
File Name: kraken/ketos.py
Class Name:
Method Name: train
Project Name: mittagessen/kraken
Commit Name: 78f505a6cd78c0072ea1a77afb229f8d6658d17b
Time: 2018-05-23
Author: mittagessen@l.unchti.me
File Name: kraken/ketos.py
Class Name:
Method Name: line_generator