Dontopedia

return_tensors

From Dontopedia, the open, paraconsistent wiki. (Last updated 2026-06-11.)

return_tensors has 25 facts recorded in Dontopedia across 10 references, with 5 live disagreements.

25 facts·10 predicates·10 sources·5 in dispute

Mostly:rdf:type(7), has value(4), value(3)

Maturity scale raw canonical shape-checked rule-derived certified

Inbound mentions (8)

Other subjects in dontopedia point AT this entity as a value. These are inverse relationships — e.g. "X motherOf this subject" — and answer questions the forward facts can't. Grouped by predicate.

calledWithCalled With(2)

hasParameterHas Parameter(2)

usesParameterUses Parameter(2)

calledWithParameterCalled With Parameter(1)

hasArgumentHas Argument(1)

Other facts (23)

The long tail: predicates that appear too rarely to warrant their own section. Filter or scroll to find a specific one. Each row links to its source.

23 facts
PredicateValueRef
Rdf:typeTokenizer Parameter[2]
Rdf:typeParameter[3]
Rdf:typeOutput Format[4]
Rdf:typeFunction Argument[5]
Rdf:typeTokenizer Parameter[7]
Rdf:typeParameter[9]
Rdf:typeParameter[10]
Has Value"pt"[1]
Has Valuept[2]
Has ValuePt Tensor Type[4]
Has Valuetrue[9]
Valuept[7]
Valuepytorch-tensor[8]
Value"pt"[10]
Parameter Valuept[3]
Parameter ValuePt[5]
Applies toQuery Variable[4]
Applies toPassage Variable[4]
Has PurposePytorch Tensor Output[1]
Parameter Namereturn_tensors[3]
EnablesTensor Output[4]
Is Configured AsPt Tensor Type[4]
SpecifiesPytorch Format[6]

Timeline

Timeline axis is valid_time — when each source says the fact was true in the world, not when Dontopedia learned about it. Retracted rows are kept for provenance; coloured stripes indicate the context kind.

hasValuebeam/c470eab1-38ce-41c3-9d0a-f012e744b156
"pt"
hasPurposebeam/c470eab1-38ce-41c3-9d0a-f012e744b156
ex:pytorch-tensor-output
typebeam/8036737b-9c5e-4cf6-8fd5-40137132613b
ex:Tokenizer-Parameter
hasValuebeam/8036737b-9c5e-4cf6-8fd5-40137132613b
pt
typebeam/b04fbb01-0357-4127-b979-b3b93c026864
ex:Parameter
parameterNamebeam/b04fbb01-0357-4127-b979-b3b93c026864
return_tensors
parameterValuebeam/b04fbb01-0357-4127-b979-b3b93c026864
pt
hasValuebeam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
ex:pt-tensor-type
typebeam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
ex:OutputFormat
appliesTobeam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
ex:query-variable
appliesTobeam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
ex:passage-variable
enablesbeam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
ex:tensor-output
isConfiguredAsbeam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
ex:pt-tensor-type
typebeam/893846b7-2485-431d-970b-b70aaf9c7c59
ex:FunctionArgument
labelbeam/893846b7-2485-431d-970b-b70aaf9c7c59
return_tensors
parameterValuebeam/893846b7-2485-431d-970b-b70aaf9c7c59
ex:pt
specifiesbeam/5d8a681b-1fe3-4aff-8534-8603ba9d9bfc
ex:pytorch-format
typebeam/03e9535f-b129-47f6-9c40-934a5df3e95a
ex:TokenizerParameter
labelbeam/03e9535f-b129-47f6-9c40-934a5df3e95a
return_tensors
valuebeam/03e9535f-b129-47f6-9c40-934a5df3e95a
pt
valuebeam/eb869acc-2b0a-4006-98fb-a7f182c6bf42
pytorch-tensor
typebeam/0f668a3a-349a-49b5-bde3-839e439e5464
ex:Parameter
hasValuebeam/0f668a3a-349a-49b5-bde3-839e439e5464
true
typebeam/6964a23c-e677-4804-957c-6b37fd691ca1
ex:Parameter
valuebeam/6964a23c-e677-4804-957c-6b37fd691ca1
"pt"

References (10)

10 references
  1. ctx:claims/beam/c470eab1-38ce-41c3-9d0a-f012e744b156
    • full textbeam-chunk
      text/plain1 KBdoc:beam/c470eab1-38ce-41c3-9d0a-f012e744b156
      Show excerpt
      ```python def retrieve(queries): # Tokenize the queries inputs = tokenizer(queries, padding=True, truncation=True, return_tensors="pt") # Perform retrieval using the LLM outputs = model(**inputs
  2. ctx:claims/beam/8036737b-9c5e-4cf6-8fd5-40137132613b
    • full textbeam-chunk
      text/plain1 KBdoc:beam/8036737b-9c5e-4cf6-8fd5-40137132613b
      Show excerpt
      Finally, you can combine the results from both sparse and dense retrievals. One common approach is to use a weighted sum of the scores from both methods. Here's a more complete example: ```python import numpy as np from sklearn.feature_ex
  3. ctx:claims/beam/b04fbb01-0357-4127-b979-b3b93c026864
    • full textbeam-chunk
      text/plain1 KBdoc:beam/b04fbb01-0357-4127-b979-b3b93c026864
      Show excerpt
      - Ensure the new model integrates seamlessly with the rest of the retrieval pipeline. ### Example Implementation #### Step 1: Data Preparation Prepare your dataset for training and validation: ```python from transformers import AutoT
  4. ctx:claims/beam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
    • full textbeam-chunk
      text/plain1 KBdoc:beam/ed1fe5c9-0d2f-425a-9888-9c4101e2d59a
      Show excerpt
      def __init__(self, queries, passages, tokenizer): self.queries = queries self.passages = passages self.tokenizer = tokenizer def __getitem__(self, idx): query = self.queries[idx] passage = se
  5. ctx:claims/beam/893846b7-2485-431d-970b-b70aaf9c7c59
  6. ctx:claims/beam/5d8a681b-1fe3-4aff-8534-8603ba9d9bfc
    • full textbeam-chunk
      text/plain1 KBdoc:beam/5d8a681b-1fe3-4aff-8534-8603ba9d9bfc
      Show excerpt
      inputs = tokenizer(term, return_tensors='pt', padding=True, truncation=True) outputs = model(**inputs) embeddings = outputs.last_hidden_state.mean(dim=1) # Mean pooling return embeddings ``` ### Step 4: Retrieve Synonyms B
  7. ctx:claims/beam/03e9535f-b129-47f6-9c40-934a5df3e95a
    • full textbeam-chunk
      text/plain1 KBdoc:beam/03e9535f-b129-47f6-9c40-934a5df3e95a
      Show excerpt
      Here's an example of a hybrid approach that combines WordNet and context-aware embeddings: ```python from transformers import BertTokenizer, BertModel import torch import nltk from nltk.corpus import wordnet nltk.download('wordnet') toke
  8. ctx:claims/beam/eb869acc-2b0a-4006-98fb-a7f182c6bf42
    • full textbeam-chunk
      text/plain1 KBdoc:beam/eb869acc-2b0a-4006-98fb-a7f182c6bf42
      Show excerpt
      reformulated_queries = [model.generate(tokenizer(f"reformulate: {q}", return_tensors="pt", max_length=512, truncation=True)['input_ids'], max_length=512)[0] for q in original_queries] reformulated_texts = [tokenizer.decode(output, skip_spec
  9. ctx:claims/beam/0f668a3a-349a-49b5-bde3-839e439e5464
  10. ctx:claims/beam/6964a23c-e677-4804-957c-6b37fd691ca1
    • full textbeam-chunk
      text/plain1 KBdoc:beam/6964a23c-e677-4804-957c-6b37fd691ca1
      Show excerpt
      Once we have the profiling results, we can analyze them to pinpoint the slowest parts of the code. ### Step 3: Optimize the Code Based on the analysis, we can make targeted optimizations to improve performance. ### Example Code with Prof

See also

Keep researching

Missing something or suspicious of what's here? Kick off a research session — a Claude agent will investigate, cite its sources, and file new facts into a dedicated context you can review before accepting into the shared view.