Skip to content

Simple Candle frontend for building neural networks (inspired by Keras)

Notifications You must be signed in to change notification settings

rickfast/sconce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sconce

Example training code

fn train_example() -> Result<()> {
    let device = &Device::Cpu;
    let variables = VarMap::new();
    let model = Sequential::new()
        .add_layer(&Dense::new(2).kernel_initializer(ZERO).build())
        .add_layer(&Activation::new(Relu).build())
        .compile(&variables, &Device::Cpu, nll, Optimizers::AdamWDefault)?;
    let x = &Tensor::new(&[1.], &device)?;
    let y = &Tensor::new(&[1.], &device)?;

    let output = model.fit(x, y, 10)?;

    println!("Loss: {}", output.loss);

    Ok(())
}

About

Simple Candle frontend for building neural networks (inspired by Keras)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages