import { LitElementWw } from '@webwriter/lit' import { CSSResult, TemplateResult, html } from 'lit' import { customElement, property } from 'lit/decorators.js' import { globalStyles } from '@/global_styles' import type { CNeuron } from '@/components/network/neuron' import { CCard } from '../reusables/c-card' import { msg } from '@lit/localize' export class NeuronActivationCard extends LitElementWw { static scopedElements = { 'c-card': CCard, } @property({ attribute: false }) accessor neuron: CNeuron // STYLES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static styles: CSSResult = globalStyles // RENDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - render(): TemplateResult<1> { return html`
${msg('Activation function')}

Activation: ${this.neuron.layer.conf.activation.name}

${Object.hasOwn(this.neuron.layer.conf.activation, 'img') ? html`` : html``}

${msg( "After calculating a neuron's value by adding up its weighted input values and its bias:", )} ${this.neuron.layer.conf.activation.description}

${msg('Range of possible output values:')} ${this.neuron.layer.conf.activation.range}

` } }