From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id eB61GJJxO2ZiJgAAqHPOHw:P1 (envelope-from ) for ; Wed, 08 May 2024 14:35:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eB61GJJxO2ZiJgAAqHPOHw (envelope-from ) for ; Wed, 08 May 2024 14:35:30 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZXisFn40; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715171730; a=rsa-sha256; cv=none; b=Axmh8CTVyl11hvU7i+Q5SUiRq5MMfTGzhekDCCQJQZwVgbWGgeMhy2MqSFXioKylRd8ryT lzvKqeBO55sFo+9sxNyW8LDdEAIvimtm/ZV6xk5ftpztHlc6T4e2kRB/TmiTl61MgzFIN9 wvCUVcVNrDpphoOPQN2dTcH/UuvH2krW/Ikg4JMu1vaxbqv5HK/OdRuXWOcLH0fHpBxRkd VbVLsDGUZ5xdnu6GsPYnnQjiSmQwp+qpQ1iIclazl37h3xuI/9Hr7UwSVouIOHlXWacNTn LMszRuZUhg9UJonC1IG7kY9yRSP0qdoW2aHhLWBIRN2GWgnPJ6PaRAqq4T2dDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZXisFn40; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715171730; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fz9c7Pl7xJxI9p/KAqy2kUOWWD6xZ29J2AEMErUcMG4=; b=FvWTug29JFhdzA5yCPCS5RzXd881rU3BGHHi7Pko4C5mh6cMcL47Cd+oLeHYLa9CwukWRE 8s1Q4osewVSlf/OUBYRIMzKdyrkxorO1qBEew10NY5q3ki37Ya1e0BKa86abSiGJlGIMTh uhOLOhLViIoVU/XBoqfmYMRqQVpE2NdbelqwTuFhwk6IMVZV7KNnP6/e0CD0U2U+iZESOS KfmR/hT+NGdclUKq29Uzb3Xl2MNfitz9i78QT/z378hWcztRu3TkIdq+KlChf0f6eJ6y9R ql7buVicynUgm0OD3MPlbtAJWJ7aK31XT7zlTLQDnOF5yUe6pLXpZSknZtv66A== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 27D5018B98 for ; Wed, 8 May 2024 14:35:30 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4gVk-0001Oa-Ot; Wed, 08 May 2024 08:35:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4gVj-0001Gh-0A for help-guix@gnu.org; Wed, 08 May 2024 08:35:03 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4gVd-0004qN-4R for help-guix@gnu.org; Wed, 08 May 2024 08:35:02 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-34cba0d9a3eso348016f8f.1 for ; Wed, 08 May 2024 05:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715171695; x=1715776495; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fz9c7Pl7xJxI9p/KAqy2kUOWWD6xZ29J2AEMErUcMG4=; b=ZXisFn40TPjC6ORMegX7nD+qrThYNw83jjSTPdClfKhxMtENlvinXMQuJYeR0+ez3J p9HrKchoMcgryaDavXaMwgI3PtIBuSiB/2LBG9U1w3DMCRI1tlftn3mp3IM0q+CTjT9A ndsPA1OHBd9n6PCnhOFZQuxZ6+6V+vnaAc8aAyHOyO/iIhoqnFdWxA/XSZrJ7aHgPDSU mGemzPd1WhFeurIRBx1kWtHZ6sra/cpDcif7zkaE0P9fuCRvFnnJqWVmAB3VeEuny1Xe DZ8DQYMr/7ycX55j461ClU88JmW1v9ZT1sExsxklDszwrjWgkWiadkPaBMKrpJRDK/cC ycLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715171695; x=1715776495; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fz9c7Pl7xJxI9p/KAqy2kUOWWD6xZ29J2AEMErUcMG4=; b=aivpTCnALW87NDsf+SnkzDywx65TnQmCJmgAnosIIpDqZhZzqfLyKsJ+Hkz0uLDTtp EkmN2enFdl29ZyBk/uM5a7va4s0mxUOqwU0RBBxNY6DWTF8VUmeeg+39EnQl6vTZCA2n iVyCC+PfI5JS2Cj8CXfnoya4jvaJIg/lVisb5+2s76jW/JI1wOeP50d9vDG44JP31z4U l9NyFC3V+i6fQRO59rDtCx/a04gszhV2h+3de1DokaQBUrzyVFxaRq5lXm1FgdRaowTp quAiJ8rukzn52E4ZQ8ssx/nz8wnzuZ993Rk7IyyDIvGeGDugbY1x8cJUSN4RYQJDjuQ2 TjvQ== X-Gm-Message-State: AOJu0YztkZgy68fSDsD6NVlDTvya5G9fWm8vooC0/EerO+sHDrZWzy4W tC/Bq/lKQ0iuk+uer0xvtccLK9R+y07dllX3/w86TAkxPBOA9hjWqseHzA== X-Google-Smtp-Source: AGHT+IER0skm5WZAwr8m2x7/Jx3yQmcNiZKRHa6P9kPDjWEgJQ8qOU+kKisHcoUnrNTmCEP88ICjAQ== X-Received: by 2002:a05:6000:a8c:b0:34a:a754:eb51 with SMTP id ffacd0b85a97d-34fca62357amr1862424f8f.3.1715171694521; Wed, 08 May 2024 05:34:54 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:4f1a:64ed:1a31:671f]) by smtp.gmail.com with ESMTPSA id f6-20020a5d58e6000000b0034dd063e8dasm15231486wrd.86.2024.05.08.05.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 05:34:54 -0700 (PDT) From: Simon Tournier To: Ricardo Wurmus Cc: help-guix@gnu.org, QUENTIN Samuel Subject: Re: how to use r-keras? In-Reply-To: <87jzk4ipee.fsf@elephly.net> References: <87y1a15cym.fsf@gmail.com> <87jzlkaa7p.fsf@elephly.net> <87edaeq30m.fsf@gmail.com> <87jzk4ipee.fsf@elephly.net> Date: Wed, 08 May 2024 14:34:48 +0200 Message-ID: <878r0ktrbr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01, WEIRD_PORT=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 27D5018B98 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.71 X-Spam-Score: -8.71 X-TUID: 2nBRIHg6PRWP Hi Ricardo, On mer., 08 mai 2024 at 12:11, Ricardo Wurmus wrote: > This appears to be a common problem, but we don't know why. It's > probably related to the bazel-build-system. You'll get substitutes only > if you use `--no-grafts'. Ah, weird=E2=80=A6 I miss how the build system could impact the content-add= ress. Another story. :-) >> Then I get this: >> >> --8<---------------cut here---------------start------------->8--- >> $ guix time-machine -C channels.scm -- shell -C r r-keras -C >> python-minimal r-reticulate tensorflow@2.13.1 > > You need python-tensorflow (also from guix-science), not just the > tensorflow library. Cool! It just works! Thank you. Cheers, simon --8<---------------cut here---------------start------------->8--- $ guix time-machine -C channels.scm \ -- shell -C r r-keras -C python-minimal r-reticulate tensorflow@2.13= .1 python-tensorflow [env]$ R R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(keras) > model <- keras_model_sequential() Would you like to create a default python environment for the reticulate pa= ckage? (Yes/no/cancel) no 2024-05-08 12:30:26.110266: I tensorflow/core/util/port.cc:110] oneDNN cust= om operations are on. You may see slightly different numerical results due = to floating-point round-off errors from different computation orders. To tu= rn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=3D0`. 2024-05-08 12:30:26.137568: I tensorflow/core/platform/cpu_feature_guard.cc= :182] This TensorFlow binary is optimized to use available CPU instructions= in performance-critical operations. To enable the following instructions: SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX512F A= VX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with th= e appropriate compiler flags. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard in= stallation. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard in= stallation. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard in= stallation. WARNING:root:Limited tf.summary API due to missing TensorBoard installation. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard in= stallation. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard in= stallation. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard in= stallation. > model %>% # Adds a densely-connected layer with 64 units to the model: layer_dense(units =3D 64, activation =3D 'relu') %>% # Add another: layer_dense(units =3D 64, activation =3D 'relu') %>% # Add a softmax layer with 10 output units: layer_dense(units =3D 10, activation =3D 'softmax') + + + + + + + + + >=20 > model %>% compile( optimizer =3D 'adam', loss =3D 'categorical_crossentropy', metrics =3D list('accuracy') ) + + + + >=20 > data <- matrix(rnorm(1000 * 32), nrow =3D 1000, ncol =3D 32) labels <- matrix(rnorm(1000 * 10), nrow =3D 1000, ncol =3D 10) model %>% fit( data, labels, epochs =3D 10, batch_size =3D 32 ) > > > + + + + + Epoch 1/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 837us/step - loss: -0.2669 - accuracy: 0.1060 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 951us/step - loss: -0.2669 - accuracy: 0.1060 Epoch 2/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 743us/step - loss: -0.4499 - accuracy: 0.1120 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 1ms/step - loss: -0.4499 - accuracy: 0.1120= =20=20 Epoch 3/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 682us/step - loss: -0.6262 - accuracy: 0.1050 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 736us/step - loss: -0.6262 - accuracy: 0.1050 Epoch 4/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 643us/step - loss: -0.8110 - accuracy: 0.1150 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 695us/step - loss: -0.8110 - accuracy: 0.1150 Epoch 5/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 614us/step - loss: -1.0271 - accuracy: 0.1270 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 659us/step - loss: -1.0271 - accuracy: 0.1270 Epoch 6/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 535us/step - loss: -1.1987 - accuracy: 0.1480 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 599us/step - loss: -1.1987 - accuracy: 0.1480 Epoch 7/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 637us/step - loss: -1.4685 - accuracy: 0.1230 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 739us/step - loss: -1.4685 - accuracy: 0.1230 Epoch 8/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 608us/step - loss: -1.7238 - accuracy: 0.1380 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 654us/step - loss: -1.7238 - accuracy: 0.1380 Epoch 9/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 552us/step - loss: -1.9540 - accuracy: 0.1270 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 592us/step - loss: -1.9540 - accuracy: 0.1270 Epoch 10/10 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 705us/step - loss: -2.2367 - accuracy: 0.1160 32/32 [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] - 0s 773us/step - loss: -2.2367 - accuracy: 0.1160 >=20 --8<---------------cut here---------------end--------------->8---