Il supporto dell'ottimizzazione dell'API Gemini fornisce un meccanismo per selezionare gli output quando hai un piccolo set di dati di esempi di input/output. Per maggiori dettagli, consulta la guida all'ottimizzazione dei modelli e il tutorial.
Metodo: TunedModels.create
- Endpoint
- Parametri di ricerca
- Corpo della richiesta
- Corpo della risposta
- Ambiti di autorizzazione
- Richiesta di esempio
- .
- Crea
Crea un modello ottimizzato. Controlla l'avanzamento dell'ottimizzazione intermedia (se presente) tramite il servizio google.longrunning.Operations
.
Accedi allo stato e ai risultati tramite il servizio Operations. Esempio: GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222
Endpoint
pubblica
https://generativelanguage.googleapis.com/v1beta/tunedModels
Parametri di query
tunedModelId
string
(Facoltativo) L'ID univoco per il modello ottimizzato, se specificato. Questo valore deve contenere fino a 40 caratteri, il primo carattere deve essere una lettera e l'ultimo una lettera o un numero. L'ID deve corrispondere all'espressione regolare: [a-z]([a-z0-9-]{0,38}[a-z0-9])?
.
Corpo della richiesta
Il corpo della richiesta contiene un'istanza di TunedModel
.
displayName
string
(Facoltativo) Il nome da visualizzare per questo modello nelle interfacce utente. Il nome visualizzato deve contenere fino a 40 caratteri, spazi inclusi.
description
string
(Facoltativo) Una breve descrizione di questo modello.
tuningTask
object (TuningTask
)
Obbligatorio. L'attività di ottimizzazione che crea il modello ottimizzato.
source_model
. Il modello utilizzato come punto di partenza per l'ottimizzazione. source_model
può essere solo uno dei seguenti:
tunedModelSource
object (TunedModelSource
)
(Facoltativo) TunedModel da usare come punto di partenza per l'addestramento del nuovo modello.
baseModel
string
Immutabile. Il nome di Model
da ottimizzare. Esempio: models/gemini-1.5-flash-001
temperature
number
(Facoltativo) Controlla la casualità dell'output.
I valori possono essere superiori a [0.0,1.0]
inclusi. Un valore più vicino a 1.0
produrrà risposte più variegate, mentre un valore più vicino a 0.0
genererà risposte meno sorprendenti da parte del modello.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
topP
number
(Facoltativo) Per il campionamento del nucleo.
Il campionamento del nucleo prende in considerazione l'insieme più piccolo di token la cui somma di probabilità è almeno topP
.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
topK
integer
(Facoltativo) Per il campionamento Top-k.
Il campionamento Top-k prende in considerazione l'insieme di topK
token più probabili. Questo valore specifica il valore predefinito che deve essere utilizzato dal backend durante la chiamata al modello.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
Esempio di richiesta
Python
Corpo della risposta
Questa risorsa rappresenta un'operazione a lunga esecuzione risultante da una chiamata API di rete.
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
name
string
Il nome assegnato dal server, che è univoco soltanto all'interno dello stesso servizio che lo restituisce originariamente. Se utilizzi la mappatura HTTP predefinita, name
deve essere il nome di una risorsa che termina con operations/{unique_id}
.
metadata
object
Metadati specifici del servizio associati all'operazione. In genere, contiene informazioni sull'avanzamento e metadati comuni come l'ora di creazione. Alcuni servizi potrebbero non fornire questi metadati. Qualsiasi metodo che restituisce un'operazione a lunga esecuzione deve documentare l'eventuale tipo di metadati.
Un oggetto che contiene campi di tipo arbitrario. Un campo aggiuntivo "@type"
contiene un URI che identifica il tipo. Esempio: { "id": 1234, "@type": "types.example.com/standard/id" }
.
done
boolean
Se il valore è false
, significa che l'operazione è ancora in corso. Se true
, l'operazione viene completata e sono disponibili error
o response
.
result
. Il risultato dell'operazione, che può essere un valore error
o un valore response
valido. Se done
== false
, non sono impostati né error
né response
. Se done
== true
, può essere impostato esattamente un valore tra error
o response
. Alcuni servizi potrebbero non fornire il risultato. result
può essere solo uno dei seguenti:
error
object (Status
)
Il risultato dell'errore dell'operazione in caso di errore o di annullamento.
response
object
La risposta normale e riuscita dell'operazione. Se il metodo originale non restituisce dati in caso di esito positivo, ad esempio Delete
, la risposta è google.protobuf.Empty
. Se il metodo originale è standard Get
/Create
/Update
, la risposta dovrebbe essere la risorsa. Per altri metodi, la risposta deve essere di tipo XxxResponse
, dove Xxx
è il nome del metodo originale. Ad esempio, se il nome del metodo originale è TakeSnapshot()
, il tipo di risposta dedotto è TakeSnapshotResponse
.
Un oggetto che contiene campi di tipo arbitrario. Un campo aggiuntivo "@type"
contiene un URI che identifica il tipo. Esempio: { "id": 1234, "@type": "types.example.com/standard/id" }
.
Rappresentazione JSON |
---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
Metodo: TunedModels.generateContent
- Endpoint
- Parametri percorso
- Corpo della richiesta
- Corpo della risposta
- Ambiti di autorizzazione
- Richiesta di esempio
Genera una risposta del modello dato un input GenerateContentRequest
. Per informazioni dettagliate sull'utilizzo, consulta la guida alla generazione del testo. Le capacità di input variano tra i modelli, inclusi i modelli ottimizzati. Per maggiori dettagli, consulta la guida ai modelli e la guida all'ottimizzazione.
Endpoint
pubblica
https://generativelanguage.googleapis.com/v1beta/{model=tunedModels/*}:generateContent
Parametri del percorso
model
string
Obbligatorio. Il nome dell'elemento Model
da utilizzare per generare il completamento.
Formato: name=models/{model}
. Il formato è tunedModels/{tunedmodel}
.
Corpo della richiesta
Il corpo della richiesta contiene dati con la seguente struttura:
contents[]
object (Content
)
Obbligatorio. I contenuti della conversazione corrente con il modello.
Per le query a turno singolo, si tratta di una singola istanza. Per le query in più passaggi come la chat, si tratta di un campo ripetuto che contiene la cronologia della conversazione e l'ultima richiesta.
tools[]
object (Tool
)
(Facoltativo) Un elenco di Tools
che Model
può utilizzare per generare la risposta successiva.
Un Tool
è una porzione di codice che consente al sistema di interagire con sistemi esterni per eseguire un'azione o un insieme di azioni al di fuori delle conoscenze e dell'ambito di Model
. I valori di tipo Tool
supportati sono Function
e codeExecution
. Per saperne di più, consulta le Chiamate di funzione e le guide sull'esecuzione del codice.
toolConfig
object (ToolConfig
)
(Facoltativo) Configurazione dello strumento per qualsiasi Tool
specificato nella richiesta. Per un esempio di utilizzo, consulta la guida alla chiamata di funzione.
safetySettings[]
object (SafetySetting
)
(Facoltativo) Un elenco di istanze SafetySetting
univoche per il blocco di contenuti non sicuri.
Questa norma verrà applicata in modo forzato a GenerateContentRequest.contents
e GenerateContentResponse.candidates
. Non dovrebbe essere presente più di un'impostazione per ogni tipo di SafetyCategory
. L'API bloccherà tutti i contenuti e le risposte che non rispetteranno le soglie impostate da queste impostazioni. Questo elenco sostituisce le impostazioni predefinite per ogni SafetyCategory
specificato in safetySettings. Se non è presente alcun valore SafetySetting
per un determinato SafetyCategory
nell'elenco, l'API utilizzerà l'impostazione di sicurezza predefinita per la categoria in questione. Sono supportate le categorie di danni HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT e HARM_CATEGORY_HARASSMENT. Consulta la guida per informazioni dettagliate sulle impostazioni di sicurezza disponibili. Consulta anche le indicazioni sulla sicurezza per scoprire come incorporare le considerazioni sulla sicurezza nelle tue applicazioni di IA.
systemInstruction
object (Content
)
(Facoltativo) Lo sviluppatore ha impostato le istruzioni di sistema. Al momento, solo testo.
generationConfig
object (GenerationConfig
)
(Facoltativo) Opzioni di configurazione per la generazione e gli output del modello.
cachedContent
string
(Facoltativo) Il nome dei contenuti memorizzati nella cache da utilizzare come contesto per la previsione. Formato: cachedContents/{cachedContent}
Esempio di richiesta
Testo
Python
Node.js
Vai
Conchiglia
Kotlin
Swift
Dart
Java
Immagine
Python
Node.js
Vai
Conchiglia
Kotlin
Swift
Dart
Java
Audio
Python
Node.js
Conchiglia
Video
Python
Node.js
Vai
Conchiglia
Python
Conchiglia
Chat
Python
Node.js
Vai
Conchiglia
Kotlin
Swift
Dart
Java
Cache
Python
Node.js
Modello ottimizzato
Python
Modalità JSON
Python
Node.js
Vai
Conchiglia
Kotlin
Swift
Dart
Java
Esecuzione del codice
Python
Kotlin
Java
Chiamata di funzione
Python
Node.js
Conchiglia
Kotlin
Swift
Dart
Java
Configurazione di generazione
Python
Node.js
Vai
Conchiglia
Kotlin
Swift
Dart
Java
Impostazioni di sicurezza
Python
Node.js
Vai
Conchiglia
Kotlin
Swift
Dart
Java
Istruzione di sistema
Python
Node.js
Vai
Conchiglia
Kotlin
Swift
Dart
Java
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di GenerateContentResponse
.
Metodo: TunedModels.get
- Endpoint
- Parametri percorso
- Corpo della richiesta
- Corpo della risposta
- Ambiti di autorizzazione
- Richiesta di esempio
- .
- Scarica
Recupera informazioni su uno specifico TunedModel.
Endpoint
recupera
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
Parametri del percorso
name
string
Obbligatorio. Il nome risorsa del modello.
Formato: tunedModels/my-model-id
Prende il formato tunedModels/{tunedmodel}
.
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Esempio di richiesta
Python
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di TunedModel
.
Metodo: TunedModels.list
- Endpoint
- Parametri di ricerca
- Corpo della richiesta
- Corpo della risposta
- Ambiti di autorizzazione
- Richiesta di esempio
- .
- Elenca
Elenca i modelli ottimizzati creati.
Endpoint
recupera
https://generativelanguage.googleapis.com/v1beta/tunedModels
Parametri di query
pageSize
integer
(Facoltativo) Il numero massimo di TunedModels
da restituire (per pagina). Il servizio potrebbe restituire un numero inferiore di modelli ottimizzati.
Se non specificato, verranno restituiti al massimo 10 modelli ottimizzati. Questo metodo restituisce al massimo 1000 modelli per pagina, anche se passi un valore pageSize più grande.
pageToken
string
(Facoltativo) Un token di pagina, ricevuto da una precedente chiamata a tunedModels.list
.
Fornisci il valore pageToken
restituito da una richiesta come argomento per la richiesta successiva per recuperare la pagina successiva.
Durante l'impaginazione, tutti gli altri parametri forniti a tunedModels.list
devono corrispondere alla chiamata che ha fornito il token della pagina.
filter
string
(Facoltativo) Un filtro è una ricerca a testo intero sulla descrizione e sul nome visualizzato del modello ottimizzato. Per impostazione predefinita, i risultati non includeranno i modelli ottimizzati condivisi con tutti.
Operatori aggiuntivi: - proprietari:me - writers:me - reader:me - reader:tutti
Esempi: "owner:io" restituisce tutti i modelli ottimizzati per i quali il chiamante ha il ruolo di proprietario "readers:me" restituisce tutti i modelli ottimizzati per cui il chiamante ha il ruolo lettore "reader:tutti" restituisce tutti i modelli ottimizzati condivisi con tutti
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Esempio di richiesta
Python
Corpo della risposta
Risposta da tunedModels.list
contenente un elenco impaginato di modelli.
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
tunedModels[]
object (TunedModel
)
I modelli restituiti.
nextPageToken
string
Un token, che può essere inviato come pageToken
per recuperare la pagina successiva.
Se questo campo viene omesso, non ci sono altre pagine.
Rappresentazione JSON |
---|
{
"tunedModels": [
{
object ( |
Metodo: TunedModels.patch
- Endpoint
- Parametri percorso
- Parametri di ricerca
- Corpo della richiesta
- Corpo della risposta
- Ambiti di autorizzazione
Aggiorna un modello ottimizzato.
Endpoint
patch
https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
PATCH https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
Parametri del percorso
tunedModel.name
string
Solo output. Il nome del modello ottimizzato. Al momento della creazione verrà generato un nome univoco. Esempio: tunedModels/az2mb0bpw6i
se displayName è impostato al momento della creazione, la parte id del nome verrà impostata concatenando le parole della stringa displayName con trattini e aggiungendo una parte casuale per l'univocità.
Esempio:
- displayName =
Sentence Translator
- nome =
tunedModels/sentence-translator-u3b7m
Ha il formatotunedModels/{tunedmodel}
.
Parametri di query
updateMask
string (FieldMask
format)
Obbligatorio. L'elenco dei campi da aggiornare.
Si tratta di un elenco di nomi completi dei campi separati da virgole. Esempio: "user.displayName,photo"
.
Corpo della richiesta
Il corpo della richiesta contiene un'istanza di TunedModel
.
displayName
string
(Facoltativo) Il nome da visualizzare per questo modello nelle interfacce utente. Il nome visualizzato deve contenere fino a 40 caratteri, spazi inclusi.
description
string
(Facoltativo) Una breve descrizione di questo modello.
tuningTask
object (TuningTask
)
Obbligatorio. L'attività di ottimizzazione che crea il modello ottimizzato.
source_model
. Il modello utilizzato come punto di partenza per l'ottimizzazione. source_model
può essere solo uno dei seguenti:
tunedModelSource
object (TunedModelSource
)
(Facoltativo) TunedModel da usare come punto di partenza per l'addestramento del nuovo modello.
temperature
number
(Facoltativo) Controlla la casualità dell'output.
I valori possono essere superiori a [0.0,1.0]
inclusi. Un valore più vicino a 1.0
produrrà risposte più variegate, mentre un valore più vicino a 0.0
genererà risposte meno sorprendenti da parte del modello.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
topP
number
(Facoltativo) Per il campionamento del nucleo.
Il campionamento del nucleo prende in considerazione l'insieme più piccolo di token la cui somma di probabilità è almeno topP
.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
topK
integer
(Facoltativo) Per il campionamento Top-k.
Il campionamento Top-k prende in considerazione l'insieme di topK
token più probabili. Questo valore specifica il valore predefinito che deve essere utilizzato dal backend durante la chiamata al modello.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di TunedModel
.
Metodo: TunedModels.delete
Elimina un modello ottimizzato.
Endpoint
elimina
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
Parametri del percorso
name
string
Obbligatorio. Il nome risorsa del modello. Formato: tunedModels/my-model-id
Prende il formato tunedModels/{tunedmodel}
.
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
In caso di esito positivo, il corpo della risposta è vuoto.
Risorsa REST: TunedModels
- Risorsa: TunedModel
- TunedModelSource
- Stato
- TuningTask
- TuningSnapshot
- Set di dati
- TuningExamples
- TuningExample
- Iperparametri
- Metodi
Risorsa: TunedModel
Un modello ottimizzato creato utilizzando ModelService.CreateTunedModel.
name
string
Solo output. Il nome del modello ottimizzato. Al momento della creazione verrà generato un nome univoco. Esempio: tunedModels/az2mb0bpw6i
se displayName è impostato al momento della creazione, la parte id del nome verrà impostata concatenando le parole della stringa displayName con trattini e aggiungendo una parte casuale per l'univocità.
Esempio:
- displayName =
Sentence Translator
- nome =
tunedModels/sentence-translator-u3b7m
displayName
string
(Facoltativo) Il nome da visualizzare per questo modello nelle interfacce utente. Il nome visualizzato deve contenere fino a 40 caratteri, spazi inclusi.
description
string
(Facoltativo) Una breve descrizione di questo modello.
state
enum (State
)
Solo output. Lo stato del modello ottimizzato.
createTime
string (Timestamp
format)
Solo output. Timestamp di creazione del modello.
Un timestamp nel formato RFC3339 UTC "Zulu" con risoluzione in nanosecondi e fino a nove cifre frazionarie. Esempi: "2014-10-02T15:01:23Z"
e "2014-10-02T15:01:23.045123456Z"
.
updateTime
string (Timestamp
format)
Solo output. Il timestamp di aggiornamento del modello.
Un timestamp nel formato RFC3339 UTC "Zulu" con risoluzione in nanosecondi e fino a nove cifre frazionarie. Esempi: "2014-10-02T15:01:23Z"
e "2014-10-02T15:01:23.045123456Z"
.
tuningTask
object (TuningTask
)
Obbligatorio. L'attività di ottimizzazione che crea il modello ottimizzato.
source_model
. Il modello utilizzato come punto di partenza per l'ottimizzazione. source_model
può essere solo uno dei seguenti:
tunedModelSource
object (TunedModelSource
)
(Facoltativo) TunedModel da usare come punto di partenza per l'addestramento del nuovo modello.
baseModel
string
Immutabile. Il nome di Model
da ottimizzare. Esempio: models/gemini-1.5-flash-001
temperature
number
(Facoltativo) Controlla la casualità dell'output.
I valori possono essere superiori a [0.0,1.0]
inclusi. Un valore più vicino a 1.0
produrrà risposte più variegate, mentre un valore più vicino a 0.0
genererà risposte meno sorprendenti da parte del modello.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
topP
number
(Facoltativo) Per il campionamento del nucleo.
Il campionamento del nucleo prende in considerazione l'insieme più piccolo di token la cui somma di probabilità è almeno topP
.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
topK
integer
(Facoltativo) Per il campionamento Top-k.
Il campionamento Top-k prende in considerazione l'insieme di topK
token più probabili. Questo valore specifica il valore predefinito che deve essere utilizzato dal backend durante la chiamata al modello.
Questo valore specifica che il valore predefinito è quello utilizzato dal modello di base durante la creazione del modello.
Rappresentazione JSON |
---|
{ "name": string, "displayName": string, "description": string, "state": enum ( |
TunedModelSource
Modello ottimizzato come origine per l'addestramento di un nuovo modello.
tunedModel
string
Immutabile. Il nome del TunedModel
da utilizzare come punto di partenza per l'addestramento del nuovo modello. Esempio: tunedModels/my-tuned-model
baseModel
string
Solo output. Il nome della base Model
da cui è stato eseguito l'ottimizzazione di questo TunedModel
. Esempio: models/gemini-1.5-flash-001
Rappresentazione JSON |
---|
{ "tunedModel": string, "baseModel": string } |
Stato
Lo stato del modello ottimizzato.
Enum | |
---|---|
STATE_UNSPECIFIED |
Il valore predefinito. Questo valore non è utilizzato. |
CREATING |
Il modello è in fase di creazione. |
ACTIVE |
Il modello è pronto per essere utilizzato. |
FAILED |
Creazione del modello non riuscita. |
TuningTask
Attività di ottimizzazione che creano modelli ottimizzati.
startTime
string (Timestamp
format)
Solo output. Timestamp durante l'ottimizzazione del modello avviata.
Un timestamp nel formato RFC3339 UTC "Zulu" con risoluzione in nanosecondi e fino a nove cifre frazionarie. Esempi: "2014-10-02T15:01:23Z"
e "2014-10-02T15:01:23.045123456Z"
.
completeTime
string (Timestamp
format)
Solo output. Timestamp del completamento dell'ottimizzazione di questo modello.
Un timestamp nel formato RFC3339 UTC "Zulu" con risoluzione in nanosecondi e fino a nove cifre frazionarie. Esempi: "2014-10-02T15:01:23Z"
e "2014-10-02T15:01:23.045123456Z"
.
snapshots[]
object (TuningSnapshot
)
Solo output. Metriche raccolte durante l'ottimizzazione.
trainingData
object (Dataset
)
Obbligatorio. Solo input. Immutabile. I dati di addestramento del modello.
hyperparameters
object (Hyperparameters
)
Immutabile. Iperparametri che controllano il processo di ottimizzazione. Se non viene specificato, verranno usati i valori predefiniti.
Rappresentazione JSON |
---|
{ "startTime": string, "completeTime": string, "snapshots": [ { object ( |
TuningSnapshot
Registra per un singolo passaggio di ottimizzazione.
step
integer
Solo output. Il passaggio dell'ottimizzazione.
epoch
integer
Solo output. L'epoca di cui faceva parte questo passaggio.
meanLoss
number
Solo output. La perdita media degli esempi di addestramento per questo passaggio.
computeTime
string (Timestamp
format)
Solo output. Timestamp del calcolo di questa metrica.
Un timestamp nel formato RFC3339 UTC "Zulu" con risoluzione in nanosecondi e fino a nove cifre frazionarie. Esempi: "2014-10-02T15:01:23Z"
e "2014-10-02T15:01:23.045123456Z"
.
Rappresentazione JSON |
---|
{ "step": integer, "epoch": integer, "meanLoss": number, "computeTime": string } |
Set di dati
Set di dati per l'addestramento o la convalida.
dataset
. Dati incorporati o un riferimento ai dati. dataset
può essere solo uno dei seguenti:
examples
object (TuningExamples
)
(Facoltativo) Esempi in linea.
Rappresentazione JSON |
---|
{ // Union field |
TuningExamples
Un insieme di esempi di ottimizzazione. Possono essere dati di addestramento o convalida.
examples[]
object (TuningExample
)
Obbligatorio. Gli esempi. L'input di esempio può essere di testo o di discussione, ma tutti gli esempi in un insieme devono essere dello stesso tipo.
Rappresentazione JSON |
---|
{
"examples": [
{
object ( |
TuningExample
Un singolo esempio per l'ottimizzazione.
output
string
Obbligatorio. L'output del modello previsto.
model_input
. L'input del modello per questo esempio. model_input
può essere solo uno dei seguenti:
textInput
string
(Facoltativo) Input del modello di testo.
Rappresentazione JSON |
---|
{ "output": string, // Union field |
Iperparametri
Iperparametri che controllano il processo di ottimizzazione. Scopri di più all'indirizzo https://ai.google.dev/docs/model_tuning_guidance
learning_rate_option
. Opzioni per specificare il tasso di apprendimento durante l'ottimizzazione. learning_rate_option
può essere solo uno dei seguenti:
learningRate
number
(Facoltativo) Immutabile. L'iperparametro del tasso di apprendimento per l'ottimizzazione. Se non viene configurato, verrà calcolato un valore predefinito pari a 0,001 o 0,0002 in base al numero di esempi di addestramento.
learningRateMultiplier
number
(Facoltativo) Immutabile. Il moltiplicatore del tasso di apprendimento viene utilizzato per calcolare un tasso di apprendimento finale in base al valore predefinito (consigliato). Tasso di apprendimento effettivo := learningRateMultiplier * tasso di apprendimento predefinito Il tasso di apprendimento predefinito dipende dal modello di base e dalle dimensioni del set di dati. Se non viene configurato, verrà utilizzato il valore predefinito 1,0.
epochCount
integer
Immutabile. Il numero di epoche di addestramento. Un'epoca è un passaggio tra i dati di addestramento. Se non viene configurato, viene utilizzato il valore predefinito 5.
batchSize
integer
Immutabile. L'iperparametro della dimensione del batch per l'ottimizzazione. Se non viene configurato, verrà usato il valore predefinito 4 o 16 in base al numero di esempi di addestramento.
Rappresentazione JSON |
---|
{ // Union field |