ACMX 2.136.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
acmxvk::dream::anonymous_namespace{deep_dream_model.cpp} Namespace Reference

Classes

struct  TensorAscentResult

Functions

void check_cuda (cudaError_t result, std::string_view operation)
std::vector< double > double_list_attribute (const torch::jit::Module &module, const std::string &name)
std::vector< torch::Tensor > feature_outputs (const c10::IValue &value)
std::int64_t integer_attribute (const torch::jit::Module &module, const std::string &name)
std::vector< std::int64_t > integer_list_attribute (const torch::jit::Module &module, const std::string &name)
torch::Tensor normalization_tensor (const std::vector< double > &values, const torch::Device &device, torch::ScalarType scalar_type)
ModelMetadata read_metadata (const torch::jit::Module &module)
c10::IValue require_attribute (const torch::jit::Module &module, const std::string &name)
std::size_t resolve_layer (const ModelMetadata &metadata, std::string_view selector)
std::string string_attribute (const torch::jit::Module &module, const std::string &name)
std::vector< std::string > string_list_attribute (const torch::jit::Module &module, const std::string &name)
void validate_gradient_options (const GradientAscentOptions &options)
void validate_normalization (const std::vector< double > &values, bool standard_deviation)

Variables

constexpr float GRADIENT_EPSILON = 1.0e-8F
constexpr int MAX_DREAM_DIMENSION = 4096
constexpr float MAX_FEEDBACK = 0.99F
constexpr int MAX_GRADIENT_ASCENT_ITERATIONS = 100
constexpr float MAX_GRADIENT_ASCENT_STEP = 10.0F
constexpr int MAX_JITTER = 64
constexpr std::size_t MAX_LAYERS = 128
constexpr std::uintmax_t MAX_MODEL_BYTES = 2ULL * 1024ULL * 1024ULL * 1024ULL
constexpr float MAX_OCTAVE_SCALE = 3.0F
constexpr int MAX_OCTAVES = 8
constexpr float MAX_ROTATION_DEGREES = 5.0F
constexpr int MAX_SMOOTHING = 16
constexpr std::int64_t MAX_SOURCE_LAYER_INDEX = 4096
constexpr int MAX_TARGET_CHANNEL = 65535
constexpr std::int64_t MAX_TEST_INPUT_SIZE = 256
constexpr float MAX_ZOOM = 1.1F
constexpr float MIN_OCTAVE_SCALE = 1.1F
constexpr float MIN_ZOOM = 0.9F

Function Documentation

◆ check_cuda()

void acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::check_cuda ( cudaError_t result,
std::string_view operation )

Definition at line 312 of file deep_dream_model.cpp.

References check_cuda().

Referenced by check_cuda().

◆ double_list_attribute()

std::vector< double > acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::double_list_attribute ( const torch::jit::Module & module,
const std::string & name )
nodiscard

Definition at line 109 of file deep_dream_model.cpp.

References double_list_attribute(), and require_attribute().

Referenced by double_list_attribute(), and read_metadata().

◆ feature_outputs()

std::vector< torch::Tensor > acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::feature_outputs ( const c10::IValue & value)
nodiscard

Definition at line 231 of file deep_dream_model.cpp.

References feature_outputs().

Referenced by feature_outputs().

◆ integer_attribute()

std::int64_t acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::integer_attribute ( const torch::jit::Module & module,
const std::string & name )
nodiscard

Definition at line 70 of file deep_dream_model.cpp.

References integer_attribute(), and require_attribute().

Referenced by integer_attribute(), and read_metadata().

◆ integer_list_attribute()

std::vector< std::int64_t > acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::integer_list_attribute ( const torch::jit::Module & module,
const std::string & name )
nodiscard

Definition at line 99 of file deep_dream_model.cpp.

References integer_list_attribute(), and require_attribute().

Referenced by integer_list_attribute(), and read_metadata().

◆ normalization_tensor()

torch::Tensor acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::normalization_tensor ( const std::vector< double > & values,
const torch::Device & device,
torch::ScalarType scalar_type )
nodiscard

Definition at line 298 of file deep_dream_model.cpp.

References normalization_tensor().

Referenced by normalization_tensor().

◆ read_metadata()

◆ require_attribute()

c10::IValue acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::require_attribute ( const torch::jit::Module & module,
const std::string & name )
nodiscard

◆ resolve_layer()

std::size_t acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::resolve_layer ( const ModelMetadata & metadata,
std::string_view selector )
nodiscard

◆ string_attribute()

std::string acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::string_attribute ( const torch::jit::Module & module,
const std::string & name )
nodiscard

Definition at line 60 of file deep_dream_model.cpp.

References require_attribute(), and string_attribute().

Referenced by read_metadata(), and string_attribute().

◆ string_list_attribute()

std::vector< std::string > acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::string_list_attribute ( const torch::jit::Module & module,
const std::string & name )
nodiscard

Definition at line 80 of file deep_dream_model.cpp.

References require_attribute(), and string_list_attribute().

Referenced by read_metadata(), and string_list_attribute().

◆ validate_gradient_options()

◆ validate_normalization()

void acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::validate_normalization ( const std::vector< double > & values,
bool standard_deviation )

Definition at line 119 of file deep_dream_model.cpp.

References validate_normalization().

Referenced by read_metadata(), and validate_normalization().

Variable Documentation

◆ GRADIENT_EPSILON

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::GRADIENT_EPSILON = 1.0e-8F
constexpr

Definition at line 38 of file deep_dream_model.cpp.

◆ MAX_DREAM_DIMENSION

int acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_DREAM_DIMENSION = 4096
constexpr

Definition at line 43 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_FEEDBACK

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_FEEDBACK = 0.99F
constexpr

Definition at line 39 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_GRADIENT_ASCENT_ITERATIONS

int acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_GRADIENT_ASCENT_ITERATIONS = 100
constexpr

Definition at line 36 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_GRADIENT_ASCENT_STEP

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_GRADIENT_ASCENT_STEP = 10.0F
constexpr

Definition at line 37 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_JITTER

int acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_JITTER = 64
constexpr

Definition at line 48 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_LAYERS

std::size_t acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_LAYERS = 128
constexpr

Definition at line 33 of file deep_dream_model.cpp.

Referenced by read_metadata().

◆ MAX_MODEL_BYTES

std::uintmax_t acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_MODEL_BYTES = 2ULL * 1024ULL * 1024ULL * 1024ULL
constexpr

Definition at line 32 of file deep_dream_model.cpp.

◆ MAX_OCTAVE_SCALE

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_OCTAVE_SCALE = 3.0F
constexpr

Definition at line 47 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_OCTAVES

int acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_OCTAVES = 8
constexpr

Definition at line 45 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_ROTATION_DEGREES

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_ROTATION_DEGREES = 5.0F
constexpr

Definition at line 42 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_SMOOTHING

int acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_SMOOTHING = 16
constexpr

Definition at line 49 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_SOURCE_LAYER_INDEX

std::int64_t acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_SOURCE_LAYER_INDEX = 4096
constexpr

Definition at line 34 of file deep_dream_model.cpp.

Referenced by read_metadata().

◆ MAX_TARGET_CHANNEL

int acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_TARGET_CHANNEL = 65535
constexpr

Definition at line 44 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MAX_TEST_INPUT_SIZE

std::int64_t acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_TEST_INPUT_SIZE = 256
constexpr

Definition at line 35 of file deep_dream_model.cpp.

Referenced by read_metadata().

◆ MAX_ZOOM

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MAX_ZOOM = 1.1F
constexpr

Definition at line 41 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MIN_OCTAVE_SCALE

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MIN_OCTAVE_SCALE = 1.1F
constexpr

Definition at line 46 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().

◆ MIN_ZOOM

float acmxvk::dream::anonymous_namespace{deep_dream_model.cpp}::MIN_ZOOM = 0.9F
constexpr

Definition at line 40 of file deep_dream_model.cpp.

Referenced by validate_gradient_options().