mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] fix typos in functorch/ and scripts/ (#156081)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/156081 Approved by: https://github.com/albanD ghstack dependencies: #156080
This commit is contained in:
committed by
PyTorch MergeBot
parent
2ccfd14e23
commit
e3507c3777
@ -157,7 +157,7 @@ if [ -n "${USE_VULKAN}" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use-specified CMake arguments go last to allow overridding defaults
|
||||
# Use-specified CMake arguments go last to allow overriding defaults
|
||||
CMAKE_ARGS+=($@)
|
||||
|
||||
# Patch pocketfft (as Android does not have aligned_alloc even if compiled with c++17
|
||||
|
@ -80,7 +80,7 @@ if [ "${VERBOSE:-}" == '1' ]; then
|
||||
CMAKE_ARGS+=("-DCMAKE_VERBOSE_MAKEFILE=1")
|
||||
fi
|
||||
|
||||
# Use-specified CMake arguments go last to allow overridding defaults
|
||||
# Use-specified CMake arguments go last to allow overriding defaults
|
||||
CMAKE_ARGS+=("$@")
|
||||
|
||||
# Now, actually build the Android target.
|
||||
|
@ -95,7 +95,7 @@ def run():
|
||||
"--no-nnc-dynamic",
|
||||
dest="nnc_dynamic",
|
||||
action="store_false",
|
||||
help="DONT't benchmark nnc with dynamic shapes",
|
||||
help="don't benchmark nnc with dynamic shapes",
|
||||
)
|
||||
parser.set_defaults(nnc_dynamic=False)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Quick scipt to apply categorized items to the
|
||||
# Quick script to apply categorized items to the
|
||||
# base commitlist . Useful if you are refactoring any code
|
||||
# but want to keep the previous data on categories
|
||||
|
||||
|
@ -156,9 +156,9 @@ class CommitClassifier(nn.Module):
|
||||
elif isinstance(most_likely_index, torch.Tensor):
|
||||
return [self.categories[i] for i in most_likely_index]
|
||||
|
||||
def get_most_likely_category_name(self, inpt):
|
||||
def get_most_likely_category_name(self, input):
|
||||
# Input will be a dict with title and author keys
|
||||
logits = self.forward(inpt)
|
||||
logits = self.forward(input)
|
||||
most_likely_index = torch.argmax(logits, dim=1)
|
||||
return self.convert_index_to_category_name(most_likely_index)
|
||||
|
||||
@ -264,9 +264,9 @@ def generate_batch(batch):
|
||||
|
||||
|
||||
def train_step(batch, model, optimizer, loss):
|
||||
inpt, targets = batch
|
||||
input, targets = batch
|
||||
optimizer.zero_grad()
|
||||
output = model(inpt)
|
||||
output = model(input)
|
||||
l = loss(output, targets)
|
||||
l.backward()
|
||||
optimizer.step()
|
||||
@ -275,8 +275,8 @@ def train_step(batch, model, optimizer, loss):
|
||||
|
||||
@torch.no_grad()
|
||||
def eval_step(batch, model, loss):
|
||||
inpt, targets = batch
|
||||
output = model(inpt)
|
||||
input, targets = batch
|
||||
output = model(input)
|
||||
l = loss(output, targets)
|
||||
return l
|
||||
|
||||
|
Reference in New Issue
Block a user