Skip to content

Require "derives TensorTree" #90

@benikm91

Description

@benikm91

This issue is a suggestion to change DimWit's behaviour regarding TensorTree.

Current case classes do not require a "derives TensorTree" as Scala can automatically derive them if needed and does so.

It would follow our explicit design, if we can force the user to write this explicitly and throw an "implicit not found" in case the user forgets. Maybe Float tree can be kept implicit as it is a property of the tree, not the case class.

// no TensorTree operations (currently this works and TensorTree operations are supported!)
case class Params(
weights: Tensor2[A, B, Float],
bias: Tensor1[B, Float],
)
// Allow TensorTree operations
case class Params(
weights: Tensor2[A, B, Float],
bias: Tensor1[B, Float],
) derives TensorTree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions