import torch
import torch.nn as nn
import torch.nn.functional as F
from transformers import AutoTokenizer
from datasets import load_dataset
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
class SelfAttention(nn.Module):
def __init__(self, embed_dim, num_heads):
super().__init__()
self.num_heads = num_heads
self.head_dim = embed_dim // num_heads
self.qkv = nn.Linear(embed_dim, 3 * embed_dim)
self.out = nn.Linear(embed_dim, embed_dim)
def forward(self, x):
B, T, C = x.shape
qkv = self....
An algebraic system is a non-empty set together with one or more operations (like addition or multiplication) defined on it.
Example: A set AAA with an operation ∗*∗ is written as (A,∗)(A, *)(A,∗).
A semigroup is a set SSS with a binary operation ∗*∗ that is associative:
(a∗b)∗c=a∗(b∗c),∀a,b,c∈S(a * b) * c = a * (b * c), \quad \forall a,b,c \in S(a∗b)∗c=a∗(b∗c),∀a,b,c∈S
A monoid is a semigroup that has an identity element
|
Tema |
Uso |
Dica |
Exemplo |
Resultado |
|
Títulos |
Estruturar documentos |
Use # para hierarquia |
# Título 1 ## Título 2 ### Título 3 |
Título 1Título 2Título 3 |
|
Ênfase |
Destacar partes importantes |
Use negrito para destaque |
*itálico* **negrito** ***ambos*** ~~riscado~~ |
itálico negrito ambos riscado |
|
Listas |
Organização de ideias |
Use listas para organizar |
- Item - Subitem 1. Primeiro |
|
|
Checklist para tarefas |
GitHub, tarefas |
Teorias do Envelhecimento Psicossocial Teoria da Desinserção: O envelhecimento é acompanhado de um desmembrar entre o indivíduo e a sociedade. Quando a desinserção é geral, o indivíduo modifica o seu sistema de valores. A perda do papel que desempenha na sociedade, a perda de relações de impessoais e sociais acabam por tornar-se situações normais e rotineiras.Teoria da Continuidade:Afirma que o envelhecimento é uma parte integrante e funcional do ciclo de vida. O indivíduo idoso
Lecture 1
flowchart
Pseudocode
• Abbreviated plain English version of actual computer code
• Symbols used in flowcharts replaced by English-like statements
• Allows programmer to focus on steps required to solve problem
Hierarchy Chart
• Shows the overall program structure
• Depict organization of program, omit specific processing logic
• Describe what each part, or module, of the program does
• Each module subdivided into a succession of submodules
Three structures
• Sequence
Ques1? Define the term mobile robotics? explain its significance and applications?
Ans Mobile Robotics – Definition
Mobile robotics is a branch of Robotics that deals with the design, construction, and operation of robots capable of moving freely in an environment (unlike fixed industrial robots). These robots use sensors, control systems, and intelligent algorithms to navigate and perform tasks autonomously or semi-autonomously.
Mobile robotics plays a crucial
Depreciated (Tangible) • Buildings • Equipment • Machinery • Vehicles
Depleted (Natural Resources) • Timber • Oil • Minerals
Amortized (Intangible) • Patents • Copyrights • Franchises • Trademarks (limited life)
Total Cost = all expenditures to get asset ready for use Includes: purchase price, taxes, shipping, installation, testing, legal fees.
Straight‑Line...