Compiled, a scalar over a matrix argument divides by each entry, where evaluation inverts

Fechada
#2,287 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Um pull request relacionado já foi integrado.

  • #2289 de @Rafael-SOWNet — integrado

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp
Domínio
backend

Direção de pesquisa

Start by reading TensorCompilation's DivideFromScalar and compare its behavior with evaluation for scalar divided by a matrix; the issue gives examples for both a matrix argument and a matrix written directly in the expression. Also review the related context in #2232 and #2286. Done means compiled evaluation of a matrix argument matches the stated inverse-based behavior rather than dividing by each entry.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Compiled, a scalar divided by a matrix argument divides by each entry, where evaluation multiplies by the inverse (#2232). Master:

Answered
"2 / [[1, 2], [3, 4]]".ToEntity().Evaled [[-4, 2], [3, -1]], which is 2 times the inverse
"x / A" compiled over GenTensor<double>, with A = [[1, 0], [0, 1]] and x = 1 [[1, Infinity], [Infinity, 1]]

With a matrix written into the expression, compiled output agrees with evaluation, because the expression is simplified before it is compiled: "x / [[1, 0], [2, 4]]" at 1 is [[1, 0], [-0.5, 0.25]]. Only a matrix argument reaches TensorCompilation's DivideFromScalar, which is Elementwise(a, x => Divide(scalar, x)).

Found while testing #2286.

Linguagem predominante
C#
Estrelas
832
Forks
79
Merge médio
1h 12min
PRs com merge (30d)
518

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ASC-Community/AngouriMath

Todas as issues de ASC-Community/AngouriMath

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.