Commit d0414aa7 authored by David Maxence's avatar David Maxence
Browse files

Ajout training nofold + base test google

parent 6d3affe3
%% Cell type:code id:israeli-hometown tags:
``` python
import numpy as np
import os
import pandas as pd
from scipy.io import wavfile
import matplotlib.pyplot as plt
```
%% Cell type:code id:waiting-today tags:
``` python
samplerate, data = wavfile.read('./7061-6-0-0.wav')
```
%% Cell type:code id:computational-europe tags:
``` python
import leaf_audio.frontend as frontend
leaf = frontend.Leaf()
melfbanks = frontend.MelFilterbanks()
tfbanks = frontend.TimeDomainFilterbanks()
sincnet = frontend.SincNet()
sincnet_plus = frontend.SincNetPlus()
```
%%%% Output: stream
WARNING:absl:Lingvo does not support eager execution yet. Please disable eager execution with tf.compat.v1.disable_eager_execution() or proceed at your own risk.
%% Cell type:code id:disciplinary-brain tags:
``` python
type(data)
```
%%%% Output: execute_result
numpy.ndarray
%% Cell type:code id:compound-diesel tags:
``` python
data = data.astype('float')
```
%% Cell type:code id:sustained-default tags:
``` python
data.dtype
```
%%%% Output: execute_result
dtype('float64')
%% Cell type:code id:developmental-lounge tags:
``` python
leaf_representation = leaf(data)
melfbanks_representation = melfbanks(data)
```
%% Cell type:code id:fuzzy-helmet tags:
``` python
type(melfbanks_representation)
```
%%%% Output: execute_result
tensorflow.python.framework.ops.EagerTensor
%% Cell type:code id:funny-emperor tags:
``` python
leaf_representation
t= melfbanks_representation.numpy
```
%% Cell type:code id:raising-stephen tags:
``` python
t
```
%%%% Output: execute_result
<bound method _EagerTensorBase.numpy of <tf.Tensor: shape=(99225, 1, 40), dtype=float32, numpy=
array([[[-11.512925, -11.512925, -11.512925, ..., -11.512925,
-11.512925, -11.512925]],
[[-11.512925, -11.512925, -11.512925, ..., -11.512925,
-11.512925, -11.512925]],
[[-11.512925, -11.512925, -11.512925, ..., -11.512925,
-11.512925, -11.512925]],
...,
[[-11.512925, -11.512925, -11.512925, ..., -11.512925,
-11.512925, -11.512925]],
[[-11.512393, -11.512265, -11.512299, ..., -11.507828,
-11.507522, -11.507188]],
[[-11.512925, -11.512925, -11.512925, ..., -11.512925,
-11.512925, -11.512925]]], dtype=float32)>>
%% Cell type:code id:dressed-present tags:
``` python
```
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment