This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import torch.nn as nn | |
| from torch.autograd import Variable as Var | |
| # define the data | |
| dt = torch.Tensor([[1,0],[0,1], [1,1], [0,0]]) | |
| labels = torch.LongTensor([1, 0, 1, 0]) | |
| learning_rate = 0.01 | |
| model = nn.Linear(2,2) | |
| criterion = nn.CrossEntropyLoss() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Thai Thien | |
| # CORRECT SPECIFICATION: | |
| # | |
| # the Queue class provides a fixed-size FIFO queue of integers | |
| # | |
| # the constructor takes a single parameter: an integer > 0 that | |
| # is the maximum number of elements the queue can hold. | |
| # | |
| # empty() returns True if and only if the queue currently |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| ''' | |
| Here's how you upload an image. For this example, put the cutest picture | |
| of a kitten you can find in this script's folder and name it 'Kitten.jpg' | |
| For more details about images and the API see here: | |
| https://api.imgur.com/endpoints/image | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying that "hahattpro.id" is my Blockstack ID. https://onename.com/hahattpro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /build |
NewerOlder