2020-01-06 06:59:35 +01:00
|
|
|
package config
|
|
|
|
|
2020-05-31 02:09:52 +02:00
|
|
|
import (
|
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
tf "github.com/tensorflow/tensorflow/tensorflow/go"
|
|
|
|
)
|
2020-01-06 06:59:35 +01:00
|
|
|
|
|
|
|
// TensorFlowVersion returns the TenorFlow framework version.
|
|
|
|
func (c *Config) TensorFlowVersion() string {
|
|
|
|
return tf.Version()
|
|
|
|
}
|
|
|
|
|
2020-05-31 02:09:52 +02:00
|
|
|
// TensorFlowModelPath returns the TensorFlow model path.
|
|
|
|
func (c *Config) TensorFlowModelPath() string {
|
|
|
|
return filepath.Join(c.AssetsPath(), "nasnet")
|
|
|
|
}
|
|
|
|
|
|
|
|
// NSFWModelPath returns the "not safe for work" TensorFlow model path.
|
|
|
|
func (c *Config) NSFWModelPath() string {
|
|
|
|
return filepath.Join(c.AssetsPath(), "nsfw")
|
2020-01-06 06:59:35 +01:00
|
|
|
}
|