juanpablomf / deep-learning-platzi Goto Github PK
View Code? Open in Web Editor NEWMateriales del curso de Deep Learning con Pytorch de Platzi
Materiales del curso de Deep Learning con Pytorch de Platzi
Just before trining the net me and a couple of students had this error:
`for epoch in range(num_epochs):
print('Epoch {}/{}'.format(epoch+1, num_epochs))
print('-'*10)
running_loss = RunningMetric() # perdida
running_acc = RunningMetric() #precision
for inputs, targets in dataloader:
inputs, targets = inputs.to(device), targets.to(device)
optimizer.zero_grad()
outputs = net(inputs)
_, preds = torch.max(outputs,1)
loss = loss_fn(outputs, targets)
loss.backward() #magias: gradientes calculados automaticamente
optimizer.step() #magia2: actualiza las perillas o los parametros
batch_size = inputs.size()[0]
running_loss.update(loss.item()*batch_size,
batch_size)
running_acc.update(torch.sum(preds == targets).float(),
batch_size)
print("Loss: {:.4f} Acc: {:.4f} ".format(running_loss(),
running_acc()))`
NotImplementedError Traceback (most recent call last)
in ()
10 optimizer.zero_grad()
11
---> 12 outputs = net(inputs)
13 _, preds = torch.max(outputs,1)
14 loss = loss_fn(outputs, targets)
1 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _forward_unimplemented(self, *input)
199 registered hooks while the latter silently ignores them.
200 """
--> 201 raise NotImplementedError
202
203
NotImplementedError: `
I tried simple things to fix it, like restarting and re-install some packages but without any good results
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.